Upgrading: Storage Directory Permissions - Failed

ssk
ssk's picture

Joined: 2005-07-15
Posts: 37
Posted: Fri, 2005-08-26 18:39

I'm upgrading from Flippin' Sweet to RC2.
In the System Check, everything else is succesful exceot Storage Directly Permissions.
I get:
Storage Directory Permissions
Failed
Error: Some files and or directories in your storage directory are not writeable by the webserver user. Run chown -R webserverUser /home/n***/g2data/ OR run chmod -R 777 /home/n***/g2data/.

I did a recursive chmod and set everthing in g2data to 777, I still get this message. What am I doing wrong?

 
ssk
ssk's picture

Joined: 2005-07-15
Posts: 37
Posted: Fri, 2005-08-26 22:24

I have manually ensured that every file in g2data is set to 777 but still no luck :(
Any suggestions?

 
ssk
ssk's picture

Joined: 2005-07-15
Posts: 37
Posted: Fri, 2005-08-26 23:04

Could it be something with the cache?
I cleared everything under /g2data/cache/derivative but still zilch.

Is it something with the cache, if yes, how do I clear it?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-08-27 00:24

have you really checked every file and directory in recursively in g2data? that's what the system check does (well, the check just checks about 200 files and directories).

 
joefart

Joined: 2005-09-22
Posts: 5
Posted: Thu, 2005-09-22 16:50

Got the same problem. Using Fedora Core 4 and g2. Originally setup g2data under /var/www/html/gallery2/g2data, but I want to move the g2data folder to /storage/g2data. My /storage is on a seperate 40GB hard drive. I modified the config file and loaded the website in the browser. Going through the updater, I get:

[img]http://www.stanford.edu/~nsbrown/g2-fail.JPG[/img]

I've done both the chown and chmod with the -R option but it still fails. I used apache as the webserverUser in the chown command?

Any help is greatly appreciated.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-09-22 17:21
Quote:
I used apache as the webserverUser in the chown command?

why is ther a question mark at the end? :)

could you please post a phpinfo link?
FAQ: What information is required when I ask for help in the forums?

 
joefart

Joined: 2005-09-22
Posts: 5
Posted: Thu, 2005-09-22 21:08

Here is the phpinfo link: http://firefire.stanford.edu/gallery2/phpinfo.php

Here is the link to my site: http://firefire.stanford.edu/gallery2/main.php

Gallery version = 2.0 core 1.0.0
PHP version = 5.0.4 apache2handler
Webserver = Apache/2.0.54 (Fedora)
Database = mysql 4.1.12
Toolkits = ArchiveUpload, Dcraw, Gd, ImageMagick, NetPBM
Operating system = Linux wra 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

The question mark was to verify that since I use apache that it should be the group and owner of the files. I assumed that webserverUser was a generic entry to be changed. Just wanted to verify that.

I do think this is a permission issue with my webserver and not a problem with g2 since I tried to make a phpinfo.php file from scratch and it first displayed a 403 forbidden when I tried to view it from my browser. I went back and checked the permissions the group and owner was root (I know I shouldn't be logged in as root :( ) but I had it chmod'ed to 777. I did a copy and paste of config.php, renamed it to phpinfo.php, then I deleted the content of the file and replaced it with the phpinfo.php info. Now it works and I don't get the 403. Could this be a SELinux policy issue?

Thanks for the fast response and I appreciate any info you may have.

I hate being a newb :(

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-09-22 21:32

ah, you've got SELinux :)

see the 2nd item on:
http://codex.gallery2.org/index.php/Gallery2:KnownIssues

 
joefart

Joined: 2005-09-22
Posts: 5
Posted: Thu, 2005-09-22 22:52

I disabled SELinux protection for httpd daemon but still have the same problem :(

 
joefart

Joined: 2005-09-22
Posts: 5
Posted: Thu, 2005-09-22 22:56

So I tried the installer again and at step 4, I get "There was an error creating the directory structure within the storage directory." I have already done chmod 777 /storage/g2data too.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-09-22 23:22

what about disabling selinux completely just for now to see if it still screwes things up?

and make sure g2data is empty before you try to start the installer again.

 
joefart

Joined: 2005-09-22
Posts: 5
Posted: Fri, 2005-09-23 17:52

Added the selinux=0 to grub.conf to disable selinux (that is one way of disabling it right?), but I still get the same problem :(

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2005-09-23 17:56

i don't know selinux. i just know that a lot of our issues are related to it.
after changing a conf value, you usually have to restart the application.
grub.conf sounds like grub, the boot loader. so you might have to reboot the server.
still, i don't know if this conf setting disables selinux stuff completely.

 
monkinetic

Joined: 2005-11-13
Posts: 2
Posted: Sun, 2005-11-13 03:01

[Solved - I had lost the versions.data file in the move from the old host]

Working on upgrading: http://speakshermind.dreamhosters.com/gallery and I'm experiencing this same permissions issue. I've chmod'd my g2data dir and still get the storage permissions error.

Quote:
Error: Some files and or directories in your storage directory are not writeable by the webserver user. Run chown -R webserverUser /home/***/speakshermind.redmonk.net/gallery/g2data/ OR run chmod -R 777 /home/***/speakshermind.redmonk.net/gallery/g2data/.

My phpinfo is here:

http://speakshermind.dreamhosters.com/gallery/phpinfo.php

I've sent my host a support request, but have not heard from them yet. I've chmod'd the darn directory a half dozen times (777 since I don't have admin on this box) and nothing has helped. I should say that though it's an upgrade, I'm not going from G1 to G2 - I had a previous install of G2 from another host that I'm trying to move over, so I have a bunch of images and data I want to keep. Ideas?

thx,

--Steve

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-11-13 03:35

chmod -R, not just chmod. chmod -R works only from the command line.
and even chmod -R can't work under certain circumstances (if you're not the owner of the dirs).

ask your webhost to chmod -R 777 or better chown -R ....

 
monkinetic

Joined: 2005-11-13
Posts: 2
Posted: Sun, 2005-11-13 03:50

I did chmod -R from the command line, and I am the owner of the dirs. I'll have to ping my host again to get them to chown it all I guess.

--Steve

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-11-13 04:23

this issue was resolved in #gallery.
monkinetic forgot to copy versions.dat when moving his g2 from one server to another.

 
savemefromtears

Joined: 2005-02-11
Posts: 4
Posted: Fri, 2005-12-23 21:14

http://www.chazcurry.com/phpinfo.php

same thing for me...

1) what the hell is selinux?
2) where the heck does it say if it's enabled on my phpinfo page?
3) how do I disable it for the time being to finish my freakin gallery 2 upgrade?

thanx so much guys!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-12-24 01:52

@SELinux:
you can't see that on phpinfo. ask your admin and if you are your admin, see:
http://codex.gallery2.org/index.php/Gallery2:Installation_on_a_SELinux_Server

please open a new topic for your issue, it's most probably unrelated.

 
Kimbotha

Joined: 2003-10-25
Posts: 4
Posted: Wed, 2006-08-30 21:32

I too was having this issue upgrading from 2.1.1 to 2.1.2 on a Debian box using the debian packages, but eventually tracked the issue down to the deb upgrade deleting my symlink from /var/lib/gallery2/g2data to /home/g2data and creating an empty g2data directory instead. Once the symlink was back the upgrade moved on

 
wuzzled

Joined: 2003-08-12
Posts: 4
Posted: Tue, 2006-09-26 15:07

I'm having this problem as well.

Here's my phpinfo:
www.suehle.com/phpinfo.php

I've followed the SELinux installation steps.

What next?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-09-26 15:37

wuzzled

please create a new forum topic with a description of your problem and information about your gallery version, your setup etc.

 
in2time

Joined: 2006-04-04
Posts: 3
Posted: Fri, 2006-10-13 15:18

I am over my head with all this command line speak. I am willing to research adn learn.

I tried to upgrade.

When the gallery 2 upgrade cam up it made it to the second step then I got this error

Error: Some files and or directories in your storage directory are not writeable by the webserver user. Run chown -R webserverUser /home/outonthe/public_html/gallery/g2data/ OR run chmod -R 777 /home/outonthe/public_html/gallery/g2data/.

I verifed the premissions on the path at 777.

It still would not work.

What next?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2006-10-13 18:13

in2time

please ask your webhost to fix the permissions for you. just send them the error that we show in the upgrader.

 
hmackiernan

Joined: 2006-11-04
Posts: 1
Posted: Thu, 2006-11-09 20:36

[deleted]

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2006-11-04 03:33

hmackiernan

since this is a linux/unix centered topic, please create a new forum topic for your issue providing some background information about the setup etc.
thanks.

i do my gallery 2 development on windows since a year (before linux), that to say: we're not windows unfriendly here.

 
ruckartj

Joined: 2006-11-06
Posts: 4
Posted: Mon, 2006-11-06 01:29

I am getting this same error: Storage Directory Permissions
Failed
Error: Some files and or directories in your storage directory are not writeable by the webserver user. Run chown -R webserverUser /home/thecompu/public_html/scoutpack64/gallery/g2data/ OR run chmod -R 777 /home/thecompu/public_html/scoutpack64/gallery/g2data/.

I have worked with my web providers for last couple of days. they have even set the 777 permissions for me. No matter what I do I get this error.

Please help! My cub scout gallery is dead right now.

Thanks

John

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-11-06 01:32

ruckartj

please create a new forum topic for your issue.
and please ensure your webhost runs chmod -R 777 using their root user.

 
enderandrew

Joined: 2006-06-01
Posts: 42
Posted: Tue, 2007-06-05 18:46

Same thing here. I contacted my host to run chmod -R 777.

I did the chmod from my FTP client as well, and from the file manager. I checked every subdirectory, and it swears g2data isn't writable. Well, right before I attempted the upgrade, it was writable and everything was working fine.

Are we sure there is nothing wrong with the installer/upgrader?

I usr nightly builds and upgrade all the time, but this is the first time it has tried to tell me that g2data isn't writable when I know it is.

Nihilism makes me smile.

 
MyWebsiteAdviser

Joined: 2007-04-12
Posts: 46
Posted: Wed, 2007-12-26 19:46
 
rogue3ky

Joined: 2008-11-29
Posts: 14
Posted: Sat, 2008-11-29 01:40

OY!

I'm having the same permissions problem. My gallery has been down for over 6 months because of this. Havn't had the time or patience to deal with it until now. It took me forever to get the gallery up and running, then a month later this update comes up.

Well, I'm finally dealing with it and found this post. I went to the permissions tool and made all my gallery stuff read/write, and bam, everything is gone! Now all I get is this message:

The server encountered an unexpected condition which prevented it from fulfilling the request.
The script had an error or it did not produce any output. If there was an error, you should be able to see it in the error log.

It can be seen here: http://www.paskovics.com/modules/Gallery/upgrade/index.php

I'm starting to rue the day I put Gallery on here...

 
rogue3ky

Joined: 2008-11-29
Posts: 14
Posted: Wed, 2008-12-03 20:36

Anyone??

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2008-12-04 03:20

rogue3ky,
This thread is over a year old. Please start a new thread.
Do these steps:
FAQ: What is the webserver error log?
debug:
FAQ: How to set/use Gallery in debug mode?
In that thread please provide as much info as you can.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
zinik

Joined: 2008-12-13
Posts: 2
Posted: Sat, 2008-12-13 05:21

Hello friends,

I have experienced similar problem and I'd like to share my problem and solution.

In my case the gallery config.php had a different value of the gallery data folder than the actual data folder on my webserver.

I think that my webserver had modified their storage units, and instead of /foo/bar/user/g2data (originally stored in config.php) the actual (existing) g2data folder was located in /home/user/g2data...

So, SOLUTION:

edit the config.php file and change the data folder directory to the correct directory name.

Hope I was helpful.

Cheers,
Jake

 
rogue3ky

Joined: 2008-11-29
Posts: 14
Posted: Fri, 2009-01-02 13:43

zinik,

That seemed to have solved part of the problem. I verified my path and it was missing a "/" in the front of it. For some reason that made the difference. I no longer get the error, and my gallery pages come up. HOWEVER, all my picture links are dead. Do I have to update the path anywhere else?

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2009-01-02 18:08
Quote:
HOWEVER, all my picture links are dead.

Uninstall the rewrite module and test if it works then reinstall the module.

Stuck? URL

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
etegration

Joined: 2003-10-06
Posts: 21
Posted: Mon, 2009-10-19 06:53

i'm pulling my hair cos of this too and Google list this and it's really the most relevant from all the search results.

My phpinfo - http://moonshine.homedns.org:2633/phpinfo.php

i tried renaming g2data to g2data.temp and created a new g2data folder, 777 that recursively too. it does work either.

 
amirali1982

Joined: 2007-05-13
Posts: 1
Posted: Thu, 2010-03-18 18:06

Hi All,

I also had this problem, and tried every solution given in this thread from chmod to chown, from SELinux to contacting server support, to clearing my caches to deleting and recreating the g2data.

What solved my problem was to specify the correct path in config.php. So, I advise anyone who is having this problem to first ensure the path in config.php is correct. After this try other solutions.

Thanks.

 
dduleep

Joined: 2010-03-31
Posts: 9
Posted: Wed, 2010-06-16 10:58

i have the same problem. i deleted all files in g2data folder(by mistake) but i have other files. i give same permission but there are no any files(only cache file that has) in g2data folder. is that possible to upgrade?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2010-06-16 17:57

Without your files in g2data, you've lost all your data. Same goes for the DB, if you lose your DB, you lose all your data. Well most of it and recreating it is more work than most want to deal with.

g2data is where your pictures are stored. You've deleted those, you'll need to restore from backup or start over.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here