"invalid albums"? Permissions issue perhaps? Thank

TheWendysGuy

Joined: 2002-12-29
Posts: 18
Posted: Sat, 2004-07-03 08:41

A very strange error when I log in to gallery as admin.

"Attention Gallery Administrator!
Gallery has detected the following 11 invalid album(s) in your albums directory
(/home/davident/public_html/albums):

album list
album list
album list

Please move it/them out of the albums directory."

These albums used to work, and I am not sure what has changed to suddenly stop them working.

Here is a "ls -l"

-jailshell-2.05b$ pwd
/home/davident/public_html/albums
-jailshell-2.05b$ ls -l
total 100
drwxrwxrwx 2 davident davident 4096 Jul 3 03:08 Album1
drwxrwxrwx 2 davident davident 4096 Jun 5 04:16 Album2
drwxrwxrwx 2 nobody nobody 4096 Jun 5 04:18 Album3
drwxrwxrwx 2 nobody nobody 4096 Jun 5 04:18 Album4
drwxrwxrwx 2 davident davident 4096 Jul 3 03:08 Album5
drwxrwxrwx 2 nobody nobody 4096 Jun 5 04:18 Album6
drwxrwxrwx 2 davident davident 4096 Jul 3 03:17 Album7
-rw-rw-r-- 1 nobody nobody 443 May 6 14:45 albumdb.dat
-rw-rw-r-- 1 nobody nobody 464 Apr 12 19:40 albumdb.dat.bak
-rwxrwxrwx 1 davident davident 0 Jan 4 2003 albumdb.dat.lock
drwxrwxrwx 2 nobody nobody 4096 Jun 5 04:18
drwxrwxrwx 2 davident davident 4096 Jun 5 04:18
drwxrwxrwx 2 nobody nobody 4096 Jun 5 04:18
drwxrwxrwx 2 davident davident 4096 Jun 28 07:03 commercials
drwxrwxrwx 2 davident davident 4096 Jun 5 04:19 family
drwxrwxrwx 2 nobody nobody 4096 Jun 5 04:16 halloween
drwxrwxrwx 2 davident davident 4096 Jul 1 12:10 jokes
drwxrwxrwx 2 nobody nobody 4096 Jun 5 04:18 lj
drwxrwxrwx 2 davident davident 4096 Jul 3 03:14 me
-rwxrwxrwx 1 davident davident 11 Jun 5 04:18 serial.dat
-jailshell-2.05b$

What should I do? Thanks.

----
Gallery URL (optional but very useful): www.davident.com/gallery
Gallery version: v1.4.3-pl2
Apache version: Apache/1.3.31
PHP version (don't just say PHP 4, please): PHP Version 4.3.3
Operating system: Linux

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Thu, 2004-07-08 21:20

Check the permissions on the .dat files in the albums that are being reported as invalid. They should be 777 (or whatever it takes for your webserver to be able to read and write to them).

 
TheWendysGuy

Joined: 2002-12-29
Posts: 18
Posted: Sun, 2004-07-11 07:37

-jailshell-2.05b$ chmod 777 *.dat
chmod: changing permissions of `album.dat': Operation not permitted
chmod: changing permissions of `photos.dat': Operation not permitted
chmod: changing permissions of `serial.8.dat': Operation not permitted
-jailshell-2.05b$ pwd
/home/davident/public_html/albums/halloween
-jailshell-2.05b$ whoami
davident
-jailshell-2.05b$

 
signe
signe's picture

Joined: 2003-07-27
Posts: 2322
Posted: Sun, 2004-07-11 07:46

The files will probably be owned by the webserver, not by your user account. If this is a hosted website, you will need to contact your webhost to change the appropriate permissions.

This is the easiest method: FAQ Gallery:c.15

 
splatt

Joined: 2004-07-15
Posts: 2
Posted: Thu, 2004-07-15 06:29

I have exactly the same problem. When I try to follow the advice in the FAQ posting, I just get the following error for each dat file e.g.:
SITE CHMOD 777 album.dat
550 album.dat: Operation not permitted

So I informed the admistrator of my server and got the following reply:
"The reason why you were not able to access certain files/ folder was because these were not owned by yourself. You are using PHP scripts which do some writing/ reading operations whereby creating new files as well. By default when a files/folder is created by a script it is owned by the system and not you as a user. This restricts the access and in order to resolve this on permanent basis you will need to change your code to incorporate CHOWN command so you can change the file ownerships once when the files/ folders are created."

My interpretation of the response: it's not our problem, it's in the code.

The situation gets stranger, however, because when I simply left the files alone for a day, some of the dat files did become accessible (but not all).

Seems like there is another set of permissions somewhere that cannot be set using chmod over ftp. Is this correct? This being the case, is the implication that you can only run Gallery reliably if you have shell(?) access?

Finally, what the hell do I do now? Can't run Gallery, can't delete the albums (even if I wanted to), can't change the permissions! Rocks and hard places come to mind.

 
splatt

Joined: 2004-07-15
Posts: 2
Posted: Thu, 2004-07-15 08:46

Managed to resolve this file permissions problem by upgrading to the latest version of Gallery (1.4.4-RC). I was previously running on 1.3.1.

The configuration wizard told me that I needed to run the 'Upgrade albums' utility. This generated some errors when it got to the offending files, but I was then able to use my ftp client to chmod 777 them. I then re-ran the upgrade albums utility and everything was hunkey-dorey. Hurrah!

(To put this in perspective, this is the first problem I have had in over a year of operation - something I can't say for most of the other software I run! Great product overall.)