Pages (2): 1 2   
Member
Member
klikini   19-11-2013, 05:07
#1

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)

Administrator
Administrator
acrylian   19-11-2013, 11:09
#2

What did setup tell about permissions? If you haven't already please look here:
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.

Member
Member
sbillard   19-11-2013, 18:40
#3

Look in your configuration file for the line that sets $conf['CHMOD']. That is the base permissions Zenphoto will use when creating files and folders. If it is missing or too strict a permission for your server you should edit the line.

Member
Member
klikini   20-11-2013, 00:23
#4

@arcylian - Check out http://snaperturephotos.com/Animals/

@sbillard - What file is this in? I looked in zenphoto_config.txt but I couldn't find it.

Member
Member
sbillard   20-11-2013, 01:09
#5

Your config file .../zp-data/zenphoto_config.txt If the line is not in that file it would be because you have not set the permissions value during setup.

Member
Member
klikini   20-11-2013, 04:58
#6

How do I add it? What data value should I give it (755?)

Administrator
Administrator
acrylian   20-11-2013, 10:32
#7

You can delete it (save your db etc credentials first) and re-run setup to let it re-create it.

Member
Member
sbillard   21-11-2013, 00:16
#8

What acrylian said is incorrect.

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.

Member
Member
klikini   21-11-2013, 00:25
#9

So I unlocked the setup files and ran setup, choosing the "relaxed" option (it was set to strict by default, and I was manually setting the permissions to 755). When I clicked the apply button in the permissions box of setup, I got a 500 internal server error. When I visit the site, I get the same thing. Did I just break my entire site?

Member
Member
sbillard   21-11-2013, 00:45
#10

Quite possibly yes. File/folder permissions can be dicey. Set them too relaxed and the security software on your site may refuse to run scripts.You can probably fix the permissions with FTP, 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.

Member
Member
klikini   21-11-2013, 00:52
#11

I have set the permissions of ALL files and folders on the server to 755, and now I get a 403 error. How do you suggest I keep my albums/names/descriptions on the files to wipe/reinstall the site? And can I move the photo files to another folder on the site, delete all ZP files, install ZP, then move the photo files back to the albums folder in my FTP program? (I also have SSH access)

Member
Member
klikini   21-11-2013, 01:25
#12

I managed to reset everything, but now when I click on the album thumbnail I get a 404 error.

Member
Member
sbillard   21-11-2013, 01:51
#13

If I visit your root (http://snaperturephotos.com/) site I get

Quote:Index of /

OLD/
blog/
indbin/
k.files/
login.html
Apache Server at snaperturephotos.com Port 80
This indicates that either the installation files are gone, or they are not visible to your WEB server.

Member
Member
klikini   21-11-2013, 02:01
#14

Yeah, I deleted them to start over. I moved the entire web root to OLD. I'm installing ZP in a /cms folder, so I don't have to deal with its files AND my files in the same place.

Member
Member
klikini   21-11-2013, 02:12
#15

So I was running setup, and I selected "relaxed" as the permission. When I hit apply, I got a 500 server error. This happens every time, and this is running setup on a clean install. Ideas please?

Member
Member
sbillard   21-11-2013, 02:23
#16

Don't set the permissions to relaxed!

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.

Member
Member
klikini   21-11-2013, 02:30
#17

Is there any way to set the default permissions to 755 (not in the setup list)?

EDIT: Contacted HostGator, awaiting reply.

Member
Member
sbillard   21-11-2013, 05:01
#18

In your configuration file above the line that reads
/** Do not edit below this line. **/
insert the following:
$conf['CHMOD'] = 0644; if (!defined('CHMOD_VALUE')) { define('CHMOD_VALUE', $conf['CHMOD']); }

Member
Member
klikini   21-11-2013, 14:22
#19

Can I do $conf['CHMOD'] = 0755;?

Administrator
Administrator
acrylian   21-11-2013, 14:31
#20

Quote:deally, permissions should be set up with 0644 files/0755 directories ([rw-r--r--] files and [rwxr-xr-x] directories) permissions, with [youruser:webservergroup] ownership. If you can do that, we highly recommend it.
http://www.zenphoto.org/news/permissions-for-zenphoto-files-and-folders

So no, basically its always a pair.

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.