broken image icons: wrong albumfolder permissions
|
spikie
Joined: 2005-06-15
Posts: 4 |
Posted: Wed, 2005-06-15 08:52
|
|
I used to succesfully run gallery on an apache server which is managed and owned by someone else. But after the server was reinstalled the permissions on new albumfolders are not set properly. I guess, this has something todo with an apache configuration. Am I right? Hopefully anybody can help me.. Kind regards |
|

Posts: 3236
It sounds like an apache or php file creation mask... but it is EXCEDINGLY odd for apache to be able to *create* a file, but then not read it. Can you do an "ls -al" of a new vs. old file and see if you see any differences? I expect that the old files are probably 777 but the new ones... the only permissions I can imagine them having, existing and not working would be 000.
Posts: 1535
I'd try doing a chmod -R 777 on the albums directory. It looks like the permissions on the old albums are set such that the httpd user can't read them.
Posts: 3236
Jordan_01002, That would be true... but he said that *old* albums are the ones that work and *new* ones do not. It could still be the case, if the /albums/ directory itself had incorrect permissions, so hopefully a recursive chmod will fix it.
Posts: 4
I'm not allowed to change the albumdir's permissions.
SITE CHMOD 777 /public_html/albums
550 /public_html/albums: Operation not permitted
The old dirs have 777, the new ones have 775.
Posts: 3236
That is almost certainly not the correct path. I would try doing "site chmod -r 777 albums" from one directory below where albums is. You are feeding it an absolute path that is probably wrong, something like /home/username/public_html/albums is almost certainly closer to being right.
All that said, the new files having a permission of 775 should be enough IF its owned by the web user. It'll need to be 777 if it isn't.
You may be able to contact your host to have them change the permissions or ownership if you can't do it yourself.
Posts: 1535
...Old... New... You expect me to be able to tell the difference at 6:30 in the morning? ;) 'Sides, recursive is recursive... either way FAQ Gallery:c.15 oughta fix it (I know, that's not the error you're getting, but the fix is the same).
Posts: 4
It still gives the same error. You're right that the host-owner can set the permission to 777 but in that case each time I create a new album I have to ask him to change permission which is not the ideal situation.
And most of all I don't want to have 777 permissions because that means anyone can modify my files, correct me if I'm wrong?
The only thing I can conclude is that the files are not owned by web user. Agree?
Posts: 3236
Well, no matter what *everyone* will be able to modify your files if gallery is to work properly on most hosts. If the host runs their webserver as *one* user (not as *your* user), then if the files are 777 OR owned by the webserver... then anyone can modify them.
So the only solution worth persuing is to have your host configure apache to run everything served for *your* site as *your* user. A large number of ISPs do this, but there is still also a large number of ISPs that don't. I doubt asking them to implement this at your ISP would result in anything happening though.
Of course, all that is an asside. Gallery SHOULD work in your setup... you just need to figure out why the files are being created with 775 permissions. Also... did you try a debug mode upload?
What exactly doesn't work? Creation of new albums? Uploading new images to old albums? Uploading new images to new albums? Moving images from old/new albums to new/old albums?
Posts: 1535
Just to clarify what error we're talking about... when you do this:
If your albums live in another place, such as inside your gallery directory, type cd {that directory} before the chmod line
You get
? Or is the error something different?
Posts: 4
No. This is exactly the error I get.
I encounter no problems while uploading images, creating albums or what so ever.
The only thing is that visitors cannot see my photos as you can see at http://blub.student.utwente.nl/~timo/gallery/Waterfeest
When I move photos from an old to a new album or from a new to an old album they won't show (broken image icon).
Also: A friend of mine hosts a gallerysite as well at this server and has exactly the same problem. He asked the host-owner several times to manually change the permissions of the album directories which fixed the problem. But, once again, this is not the situation you want.
Thanks for the help so far. I hope we can fix it!
Posts: 3236
If you visit the url of one of your images, you can see a permission denied error. I think you need to get a look at your host's access_log and/or error_log and see what that says. Then you need to figure out what user the host is running their web server as. This is something that they are almost certainly going to have to fix though, it sounds like maybe a file creation permissions mask problem or something else.
http://blub.student.utwente.nl/~timo/albums/Waterfeest/MVC_115F.thumb.jpg