Skip to main content

Creating Writable Server-side Directories

Backlight requires write access to selected folders in order to save data and manage albums. Examples are the data directory under backlight/, and the gallery upload directories used by Publisher.

You may find that your host already lets Backlight write to the necessary directories, without you needing to set permissions at all. One such host is Bluehost. If you're able to configure Backlight and publish albums, then you won't need to set permissions.

For hosts that do require permissions to be set ...

Permissions

Access is granted by modifying permissions of the folder via your FTP client. Generally, this is performed by connecting to your server via FTP, browsing to the folder, and right-clicking the folder to access properties or "Get Info". Here you may change the permissions for the selected folder(s).

The level of permissions required depends on the hosting environment. Some hosts require read/write/execute access for the role of user, but only read and execute access for the roles of group and world (known here as granting '755' access). Some hosts that require 755 permissions are Bluehost, Lunarpages and Web Hosting Hub. We advise trying to use 755 access first.

If unsuccessful in writing to the directory with 755, then ...

Other hosts require read/write/execute access for the roles of user, group and world (known here as granting '777' access). Try 777 access.

SELinux (Security Enhanced Linux)

Some hosts may have SELinux enabled by default. Recent versions of CentOS and RedHat enable SELinux out-of-the-box. Whether this setting is enabled or not will depend on your host's setup.

To enable writing to directories on servers configured with SELinux, the following command should be run on each of the data and galleries directories (changing the path as needed):

chcon -R -t httpd_sys_rw_content_t /var/www/html/backlight/data/

Beyond that, the permissions also need to be set, as described earlier on this page. Either of the two below have been tested to work in CentOS 7:

chmod 777 /var/www/html/backlight/data

or

chmod 775 /var/www/html/backlight/data
chgrp -R apache /var/www/html/backlight/data

It should be possible to achieve the same effect via FTP clients.