Bizarre Permissions Problems (Attachments)

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Haravikk
Registered User
Posts: 261
Joined: Sat Nov 02, 2002 4:42 pm

Bizarre Permissions Problems (Attachments)

Post by Haravikk » Wed Aug 13, 2014 4:27 pm

Okay, so I've recently changed my web-server from Apache to nginx, as the latter seems to have a much more stable memory footprint (Apache was often exploding in RAM usage).

Anyway, nothing else has changed, but since doing this I'm encountering a weird permissions issue with my phpBB forum; namely, many users are being told they can't download attachments because they're not authorised, even though they were sent to them in a private message!

I'm struggling to debug the issue, but I can reproduce it. Adding debug statements into download/file.php I've been able to determine that permissions are returning false that shouldn't, but I can't for the life of me figure out why, as the permissions are all reporting as expected in the admin panel. I've manually inspected various places and everything looks fine; the ACL tables in the database are correct, I've cleared the cache to recreate the cached ACL settings, and done the same with clearing the user_permissions column, but nothing seems to be repairing the permissions.

I've even managed to trigger the issue in a forum, and can see that the 'f_download' permission is coming back false, even though I'm an admin user and attachment downloading is enabled board-wide.

Now of course the fact that I've switched to nginx could be coincidental, as I can't think of any reason why it should change anything, as my database hasn't moved, and I'm using the same PHP version with the same settings (in fact it was separate from Apache anyway so nothing has changed at all).

[edit]
I just thought to try dumping the contents of $user->data, and discovered that the file is treating me as an anonymous user, even though I have valid login credentials everywhere else on the site. Any ideas why it would be ignoring my cookies? I've tried manually adding my sid to the URL and it makes no difference either, the $user variable is still coming through as if anonymous.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66845
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Bizarre Permissions Problems (Attachments)

Post by Lumpy Burgertushie » Wed Aug 13, 2014 4:54 pm

just a guess. go in the admin panel, change your cookie name ( add a number ) log out,

try again.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

Haravikk
Registered User
Posts: 261
Joined: Sat Nov 02, 2002 4:42 pm

Re: Bizarre Permissions Problems (Attachments)

Post by Haravikk » Wed Aug 13, 2014 5:14 pm

Bah! I found the problem; turns out it was a CloudFlare caching issue, they seem to have changed one of the caching policies I'm using, so I've had to change those settings to get it fixed.

Seems the change was timed to coincide with me switching to nginx so I'd up thinking it was somehow my fault ;)

Sorry for the false alarm!

Locked

Return to “[3.0.x] Support Forum”