I'm trying to get ZenPhoto 1.4.6 set up on a CentOS server. I've resolved several other issues but this one keeps coming up: a list of directories that setup claims are not writable but are set with 777 permissions. albums,cache,cache-html,plugins,uploaded,zp-data
The exact error from setup is:
`
albums folder [albums is not writeable and setup could not make it so]
Error!
Change the permissions on the albums folder to be writable by the server (chmod 777 albums)
Permissions in the file system are:
drwxrwxrwx. 2 apache apache 4096 May 26 2014 albums
drwxrwxrwx. 2 apache apache 4096 Jan 16 15:36 cache
drwxrwxrwx. 2 apache apache 4096 Jan 16 15:37 cache_html
-rw-rw-r--. 1 apache apache 0 May 26 2014 CHANGELOG.md
-rw-rw-r--. 1 apache apache 880 May 26 2014 index.php
drwxrwxrwx. 5 apache apache 4096 May 26 2014 plugins
-rw-rw-r--. 1 apache apache 881 May 26 2014 README.md
-rw-rw-r--. 1 apache apache 273 Jan 16 16:35 robots.txt
drwxrwxr-x. 7 apache apache 4096 May 26 2014 themes
drwxrwxrwx. 2 apache apache 4096 May 26 2014 uploaded
drwxrwxr-x. 12 apache apache 4096 Jan 16 16:37 zp-core
drwxrwxrwx. 2 apache apache 4096 Jan 16 15:43 zp-data
`
Did you review this already?: http://www.zenphoto.org/news/permissions-for-zenphoto-files-and-folders
You really should not need to set 777 as permissions anywhere.
I have been over that and several other documents/forum posts about permissions. the 777 was a last ditch attempt to make it work.
Turns out it was an SELinux issue. I've gotten it resolved. It might be a good idea to put something on the permissions page about checking selinux on some systems.
SELinux can be set by booleans to allow apache to serve files from a user's home directory (/home/user/public_html generally). However, the security context assigned to ~/public_html does not allow writing. To do so you have to reassign the context to httpd_sys_rw_content_t for each directory that needs write access (albums, cache, etc).
When I go to set this up on our production server, I'll create a more detailed document for how to set everything up on CentOS 6.