User Permissions and

Glooper

Joined: 2005-09-21
Posts: 225
Posted: Mon, 2009-10-05 22:39

Hi,

I've been sorting out getting permissions working correctly on my live install of G3. There was a couple of issues with my hosting as I keep getting the...

Quote:
Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to enable mod_rewrite and set AllowOverride FileInfo Options to fix this.

... error message. So after talking to my hoster's... The mod_rewrite is now enabled and I believe my hoster's have set the AllowOverride correctly. Though strangely I still get this error message... I actually ignored the message and user permissions seems to work fine. I can create a private gallery and assign a group to it correctly.. and only users in that group can view it. However I still get this error message when I view the User Permissions screen.

Basically I'm not sure why I'm getting this error message still.. could it be that the server isn't setup correctly and the files are potentially still accessible without logging in? Or is it because of a bug in G3, or is it because there's still a problem performing the action it does to test user permissions?

Any ideas?

Cheers
Ben

Benjamin Albert Smith - Photography

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2009-10-05 23:34

Post or PM me a link to the site in question or find out what the webserver is and it's version.

If we're talking about your site, it's being ran on Apache 2.0 and PHP 4.3.10, neither of which are supported. Though I'd expect the that older version of PHP would be causing more problems, and you'd be getting an error right off the bat about that :) So I'm betting we're not talking about your site.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Mon, 2009-10-05 23:37
 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Mon, 2009-10-05 23:42

just checked and it's

Apache 2.2.13
PHP 5.2.10

Ben :)

Benjamin Albert Smith - Photography

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2009-10-05 23:53

Odd, it should be working :)

I wonder if it has something to do with what ever .htaccess file(s) or settings you may already have. Is there an .htaccess in the root of the site and/or in /var?

If so, what are their contents? PM me if you don't want to put them here.

What permissions have you tried? If you deny View permissions for the Everybody group for an album (essentially denying guests access and requiring logins), an .htaccess file should get dropped into the following directories:
/var/albums/AlbumName/
/var/resizes/AlbumName/
/var/thumbs/AlbumName/

That .htaccess file will rewrite (if that's working) all direct requests for images will go through the file_proxy. However, if you let guests view stuff, the .htaccess files are not used/created and permissions are checked if you're logged in. But why deny a group of users access if guests can have access? :)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Tue, 2009-10-06 00:11

PM sent...

hmm just noticed my rather strange title for this thread.. I have no idea what I was going to put after the 'and'..

Ben

Benjamin Albert Smith - Photography

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2009-10-06 01:26

:)

Yeah, your right the rewrite appears to work. If I access the image and log out, then try to access it directly I get the DANG page (which will eventually become more friendly, hopefully just a login page)

I have to do this with Lighttpd to get that message to go away and I doubt this will work with that version of Apache, but it's worth a shot. In /modules/gallery/helpers/access.php change HTTP/1.1 to HTTP/1.0
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Glooper

Joined: 2005-09-21
Posts: 225
Posted: Tue, 2009-10-06 04:52

Thanks for the help.. I managed to fix it...

For some reason gallery didn't have permission to write in the tmp directory under var... not sure how that happened!.. anyway once I sorted out the permissions it was fine. :).. I wonder if the code should check for a file write permissions as well and display a different message if it doesn't have write access to tmp? though i'm guessing I'm just a corner case! :)

Ben

Benjamin Albert Smith - Photography

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2009-10-06 13:17

yeah, to me that's odd. On initial setup, G3 creates all the directories under /var so it should always have access to them. Maybe, just maybe, the host is running something that resets permissions on certain directories? Just an idea anyway.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here