(Preface: Gallery is an open source tool for hosting photos on your website.)
So, suppose you upgrade your copy of Gallery to the latest version (1.4.4-pl4 as of this writing), you follow the upgrade instructions, re-run the configuration wizard and then you get a goofy error such as this:
Warning: fopen(/home/abischof/httpdocs/albums/2003/photos.dat.lock): failed to open stream: Permission denied in /home/abischof/httpdocs/gallery/platform/fs_unix.php on line 55
Error: Could not open lock file (/home/abischof/httpdocs/albums/2003/photos.dat.lock)!
Yeah, that happened to me. Fortunately, there’s a known workaround. As it turns out, it’s not Gallery’s fault if this occurs — it generally only happens if your web host mucks up your permissions while upgrading your PHP setup. The solution? Just set the permissions on every file in your “albums” directory to 777.
As noted in the workaround, this is fairly straightforward if you have shell access to your web host (just run “chmod -R 777 albums” from the parent directory). But, if you only have ftp access, then you’ll need to set each set “albums” to 777 manually; and, if your ftp client can’t recurse through directories, then you’ll need to manually hop through each directory within “albums” and manually set every file to 777. That should do it :).