After a recent upgrade, new images I uploaded could not be viewed by the public (only the admin account) due to permission problems. After setting the permissions of my entire site recursivley to public read access (and yes, I changed zp-data to private), the permissions of the new photos are still set to private. I have already uninstalled/wiped/reinstalled the site twice, so please let me know if you have ideas.
Currently, all images are loading except newly uploaded ones. If I recursively change all permissions in albums and cache, they will load. Until that, they show up as an image error on the site and a 403 forbidden when I load the full image.
Thanks in advance. (PS: site is snaperturephotos.com)
Comments
http://www.zenphoto.org/news/permissions-for-zenphoto-files-and-folders
If that all doesn't help, you may have to contact your host.
Your site seems to work fine to me as far as I can see, except that it seems a bit slow.
@sbillard - What file is this in? I looked in zenphoto_config.txt but I couldn't find it.
You need to run setup and set the permissions. There will be a line about file permissions. Normally if you have not set the permissions there will be a warning box alerting you to the fact that they are not chosen. If there is no warning box there will be a link to expose the details.
But the problem is that we cannot tell you what the right answer to the data value since that is totally dependent on your server. Most likely the value you used when you recursively set the permissions on your albums and cache is the right one, though.
It may well be that your site is simply mis-configured for an application like Zenphoto. Basically Zenphoto has to be able to read/write files and folders that it "owns". Strict permissions should work for that.
If the "user" that FTP runs under is different from the "user" that your CGI scripts run under you will constantly have permissions issues since Zenphoto will not be the owner of the newly uploaded items.
Seriously, you will have to have a discussion with your server support people to resolve this. Clearly they do not allow relaxed permissions. You can leave things the way FTP leaves them if that works, but of course that does not resolve your problems with the uploads.
Basically, unless the web server and the FTP server use the same user you are simply going to have file permissions issues.
EDIT: Contacted HostGator, awaiting reply.
`/** Do not edit below this line. **/`
insert the following:
`
$conf['CHMOD'] = 0644;
if (!defined('CHMOD_VALUE')) { define('CHMOD_VALUE', $conf['CHMOD']); }
`
So no, basically its always a pair.
But that you get this error at all would indicate your site has severely restricted what applications can do with regard to setting file permissions. (Either that or you are not running current Zenphoto software. I do hope that you checked and are not making that mistake.)
Sometimes hosters get a bit too aggressive with their security and cripple legitimate applications. All totally unnecessary and a bit naive of them.
Also: HostGator said that the FTP account and the admin account were the same, so "owner" will always be me.