Silk Web Hosting: How To

Modified

SELinux Permissions

In additional to traditional Unix file permissions, your files are protected by SELinux (“Security Enhanced Linux”), which tags files in a way that describes which applications can access them.

View SELinux file contexts

If you need to see the specific SELinux file contexts, add the Z flag to your command. For example:

$ ls -laZ

Find/Repair broken SELinux file contexts

Your silk site should be configured to inherit parent directory SELinux file contexts. However, some types of file operations (like move, or un-tarring) can cause those file contexts to be set incorrectly. This may cause your site to function incorrectly. For instance, if the httpd_user_content_t is not set for ~/www-root, then the web server will be unable to read files from that directory. To check if your files have the correct SELinux contexts, you can use the fixfiles command.

For example: see if all the file contexts in ~/www-root are as expected:

$ fixfiles check ~/www-root

To restore the default file contexts for ~/www-root:

$ fixfiles restore ~/www-root