Member
Member
mypages   2013-08-29, 21:20
#1

Zenphoto is able to create the cache images but is not able to display them. The cache folder has rwxrwxrwx permissions, the subfolders (albums) it creates get rwxr-x--x permissions and the thumbnails it creates get rw-r----- permissions. With these permissions, Zenphoto is not able to access it's own created images. When manually change the permissions to rw-r--r--, Zenphoto is able to read and display the images. So is Zenphoto running under a different user which is not the owner of the cache images after it creates them by itself? (..sounds stupid, I know :-) ..but obviously it looks like that to me.

Member
Member
sbillard   2013-08-29, 22:06
#2

It is most likely the web server that is running under a different user than the Zenphoto scripts. An unfortunate situation but sometimes is how servers get configured.

Member
Member
mypages   2013-08-30, 06:07
#3

I removed (commented out) now the following lines from Zenphoto's "cacheImage()" function in functions-image.php script in order to keep the permissions of the created files to rw-r--r--

line 484: @chmod($newfile, FILE_MOD);
line 492: @chmod($newfile, FILE_MOD);

Administrator
Administrator
acrylian   2013-08-30, 08:31
#4

Hopefully you keep a note about your change as you will have to re-do it on any update. More info about permissions needed (basically what my colleague already said): http://www.zenphoto.org/news/permissions-for-zenphoto-files-and-folders

Member
Member
sbillard   2013-08-30, 15:52
#5

I suspect you will have additional permissions issues--for instance if Zenphoto uploades images. What you need to do is fix the chmod setting in your configuration file to something that works on your server.

Member
Member
mypages   2013-08-30, 18:24
#6

Thx again for your suggestions, especially the last one. I reverted my changes to the functions-image.php and added the following line to my zenphoto.cfg instead:

define('CHMOD_VALUE', 0644);

This also solved the issue and I think with that I am "update-save".

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.