Lime Daley Security Settings / Umask (Wordpress Super Cache Plugin Access)

Due to Lime Daley's security model with the shared hosting customers, one setting you might need to be aware of depending on what php software you are using is the default "umask" on the system.

For PHP, it is set to 0077, which is appropriate for any files that are created by a php application, and then need to be accessed by that application, or via FTP.  However, the "gotcha" is that those files will not be able to be served straight to the user by the web browser.  Most software applications set the read bits appropriately (a+r in our case), but some software does not, and in those cases, you can either fix the software, or use a workaround to get it to work on our servers.

The fix for the software would be to run a chmod after creating the files and/or directories (or call umask where appropriate).

The workaround is simply putting the following line at some high level point in your software.  (For Wordpress, you can put this call in wp-config.php).

umask(0022);

This will take care of setting read-only access to the everyone on the server (which would include the web server).  This might sound like a security risk, and there might be one, but we haven't thought of how to exploit it yet, since your home directories are protected from the other users on the system, so even though this umask setting gives them access to the files, they don't have access to the parent directories, so they still can't get access to the files.