I have some inherited php code that I'm attempting to secure. However, removing execute permissions from the file upload directory throws a permissions error. Here's a quick rundown:
apache points to /root/www/ (only user on the system is root)
image uploads are saved to /files via symlink at /root/www/admin/files (I have no idea why files are saved to /)
drwxrwxrwx 8 root root 4096 2011-04-06 16:51 root (root home directory) drwxr-xr-x 8 www-data www-data 4096 2011-04-01 19:34 www (folder in /root/) lrwxrwxrwx 1 root root 21 2011-03-04 20:32 files -> /files/ (symlink) drw------- 4 www-data www-data 61440 2011-04-06 16:12 files (folder in root directory) -rwxrwx--- 1 www-data www-data 81 2011-04-06 15:56 .htaccess (file in /files/)
Apache Error log excerpt:
[Wed Apr 06 16:58:24 2011] [crit] [client 184.108.40.206] (13)Permission denied: /root/www/admin/files/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://example.com
I want to change permissions on /files/ from 700 to 600. I can't figure out why .htaccess is only read-able when execute permissions are set.