Installing Gallery2 on a site thet enforces SUID bit on directories
mikha
Joined: 2009-03-04
Posts: 1 |
Posted: Wed, 2009-03-04 16:18 |
Hi! I'm trying to install Gallery 2 and couldn't get beyond "Storage Setup" step. Whatever I do, installation script complains "There was an error creating the directory structure within the storage directory." I gave "g2data" proper access rights. Here is what I see after first failed attempt to populate "g2data": ls -la g2data/ total 8 drwsrwx--- 3 mikha104 8080 512 Mar 4 18:56 . drwsrwx--- 11 mikha104 8080 512 Mar 4 17:36 .. -rw-rw---- 1 mikha104 8080 166 Mar 4 18:56 .htaccess drwsr-xr-x 2 mikha104 8080 512 Mar 4 18:56 albums Look at permission of "albums" directory! So i did The problem, as I see it, is that my provider has a peculiar setup, which enforces SUID bit on directories, making every created file/directory to belong to real user, not the one HTTP server is running under. This works fine with other PHP scripts, though, because umask is set to 0007 and all created directories are group-writable by default. I've even created small PHP script to test it: <?php mkdir("test_dir"); ?> And it creates directory PHP can write into: drwsrwx--- 2 mikha104 8080 512 Mar 4 18:39 test_dir However, it looks like Gallery2 chmod-s created directories to 755. In my environment this makes it unable to write to the directory it has just created. Any ideas on how to solve it? (Apart from changing my provider - I'm contemplating this, but the amount of work involved makes me really sick). Here are additional details: |
|