### apache/nobody owns albums

slowmail

Joined: 2002-09-13
Posts: 4
Posted: Fri, 2003-03-21 04:59

I'm currently running a reseller account on shared server space, and have several copies of gallery running on different domains/accounts.

I've noticed albums and pictures uploaded belong to the 'nobody' account, and thus does not count towards the users diskspace usage. (1 user has 400Mb worth of pictures in his gallery right now!). Small issue, except I'm worried they'll pull the plug on my account. =(

It's really been a problem, however when I had to restore one users entire account from a tar backup. Now the entire albums belong to the user instead of nobody. To allow gallery manipulate those restored images, I had to grant them 666 permissions to all the files. Being shared server space, the possibility of *another* user coming along and deleting and/or defacing the images in the gallery does become a real possibility.

I was wondering is there any way I could set gallery up so that it'll create files/albums as part of the parent account, pretty much in the same way how 'config.php' is written/updated where it belongs to the "correct" owner, with 644 permissions.

Advice anyone?

------
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery version: 1.3.3
Apache version: 1.3.27
PHP version: 4.3.1
Operating system: Linux (Kernel 2.4.18-27.7.xsmp)

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Fri, 2003-03-21 10:14
Quote:
I was wondering is there any way I could set gallery up so that it'll create files/albums as part of the parent account, pretty much in the same way how 'config.php' is written/updated where it belongs to the "correct" owner, with 644 permissions.

Wouldn't be much point. Gallery is run by the webserver, so whomever that is must have read/write permission to your gallery directory. If your files are only writeable by you, gallery can't update them.

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Fri, 2003-03-21 12:28

Someone else has already asked this. There is no way to do this without running the whole Apache daemon as you (not a good idea). Unix permissions are setup so that only root can change the ownership of files.

If you need to delete of modify the files in the albums directory, use Bharat's Cleanup Script, available in the User Guide under Scripts.