Recursive Chmod Hell

A while ago, my webhost did something. I think it was the server equivalent of flipping a pancake. Whatever it was, the White Town site was down for a while. Things seemed okay on Bzangy.

But then I noticed this kind of error cropping up in the Gallery section:

Warning: fopen(“…/albums/team/album.dat.lock”,”a+”)?

So I went to the Gallery Troubleshooting FAQ and found a little explanation:

C.15.

Why do I get this error:

Warning: fopen(“…/albums/team/album.dat.lock”,”a+”)?

This typically happens when your ISP makes a change in your environment (like upgrading PHP or moving things around) without telling you about it. In a nutshell, some of Gallery’s files wind up being owned by the wrong user and their permissions become set such that Gallery can no longer write to them. I’ve never found this to be the result of a bug in Gallery. To fix this, you can change the permissions on your Gallery data files so that Apache can read the files again. This should only happen on Unix. If you have shell access, you can fix it like this:

cd /path/to/albums
cd ..
chmod -R 777 albums

If you don’t have shell access, you can use your FTP client to recursively (every file and every directory) chmod the albums directory 777. Make sure you chmod the .users directory, which can sometimes be hidden from view. See FAQ C.19 for more details

Now, in no way am I a Unix geek. But this sounded simple, just a few permissions to correct. Surely I could manage that?

It’s four hours later now and my Gallery is still broken. 🙁

It turns out that for some reason, I can’t recursively Chmod directories on my webspace. At first I thought it was the fault of Transmit but then when I tried doing it via raw commands, it didn’t work either.

So then I thought I’d try to do it directly via SSH access. But my webhost doesn’t allow that.

I’ve been over and over it and I can’t find a solution. There’s probably some fantastic little bit of code that will do everything I need, maybe just one line. I’ve found several candidates by googling but I know if I type them in, I’ll probably end up erasing my whole damn site or something similar. All I wanted to do was upload some pics from Scream last night…

Sometimes computers are big smelly pooh.