g2data file is read only!! Chmod 777 problem please help!

aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 21:41

<Hi there -

I am so exciting about your fantastic app gallery and am in the process of testing G2 - however I am having a problem and I cannot figure out what is wrong?

I am testing G2 on my webspace with a company called Plus Net (www.plus.net) - my webspace with them for PHP MYSQL and CGI bits and pieces is http://cgi.chrismullett.plus.com

I am using a Mac G5 running OSX 10.3.7 and using Safari to test this app - the installer appears when I point the browser to http://cgi.chrismullett.plus.com/
but when I try to add the data storage g2data I keep getting the error message that the folder is read only.

As far as I am concerned I have made this file chmod 777 - access for all !! And I called plus net a few times to check if they are blocking
the access/permissions and they are not. Along side the error message in the installation at stage 4 it says the following:

Storage Setup

Gallery needs to store data in a directory on your server. It will use this directory to store your images as well as other important data. For security, we suggest that you place this directory outside the path to your webserver (document root), so that it cannot be accessed directly via the web. This is necessary if you wish to have your images accessible only via Gallery*. Note that the default path provided below is inside the webserver area. Update with a secure location, such as a path under your user home directory, if possible. If you access your site via FTP, you might not have this option.

The directory also needs to be writable by Gallery. For help with permissions, see FutureLinkToSomewhere?.

Directory path:

The directory you entered is read only

* This is sometimes known as an image firewall.

/files/home2/chrismullett/webphotos/gallery2/g2data - this is the directory path..

I just don't know what else to try - if the problem is not with my host plus net then it must be somthing I am doing or not doing??

Can you help ?

I hope so as I am really excited about using Gallery it seems like a great application but I am just so stuck!!

Thanks in advance

Eamon Kennedy. >
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://cgi.chrismullett.plus.com/webphotos/gallery2/install/index.php?step=4
Gallery version: g2 Alpha
Apache version: Apache HTTP Server Version 1.3
PHP version (don't just say PHP 4, please):PHP 4.3.9 bundle with MySQL on mac
Graphics Toolkit: Image Magick but any will do I think?
Operating system: Mac OSX V 10.3.7
Web browser/version (if applicable): Safari

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Thu, 2004-12-30 21:52

[Moved to G2 support]

 
aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 22:06

moved to G2 support? what the forum?

 
aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 22:08

Any ideas folks? I am so close to getting gallery up and running and it seems perfect but this issue with permissions is like a brick wall - there must be a simple answer??

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2004-12-30 22:09

well, let's check if this is a G2 problem or something in your environment.. try a test.php file with <?php if (is_writable('/your/g2data/path')) { print "yay"; } else { print "boo"; } ?>
see what you get from that... if G2 is working properly then you'll see "boo", as G2 thinks the directory isn't writable.

 
aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 22:33

ok will do

 
aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 22:38

boo

 
aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 22:40

Yeah looks like G2 is working fine - it says "boo" so this means the directory is not writeable - so how can I make it writable? PS - Mindless - are you a Mac or PC user???

 
aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 22:45

If you are a Mac user - this whole business of going to terminal and using chmod 777 to alter the permissions of the file g2data just dosen't seem to work? But it should work - Right?? I mean it's the same on a PC - 4+2+1=7 (X3) - should be all set to go!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2004-12-30 22:45

i am a multi-os user.
chmod 777 should make it writable.. perhaps post a link to your phpinfo.. (a php file with <?php phpinfo(); ?> in it)

 
aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 22:47
 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2004-12-30 23:00

nothing jumps out at me.. things you might try:
- is_writable on other directories.. remember g2data doesn't even need to be under your webroot
- disable Zend Optimizer.. don't know why that would matter, but who knows..
- don't run webserver/php as root.. again, should be ok, but who knows..

 
aarononeill

Joined: 2004-12-30
Posts: 9
Posted: Thu, 2004-12-30 23:07

Ok - great thanks for your help - I am sure I'll have it up and running before long!
Cheers Mindless - did'nt think I would get a reply at all..

 
alexisb
alexisb's picture

Joined: 2005-11-24
Posts: 56
Posted: Sat, 2005-12-10 16:50

Hello, I think I got it, this problem is happening in Linux distributions using SELinux, a new security policy for the file system.

I am using Fedora Core 3 (Centos 4.2, RHEL 4 and others also use SELinux), first I tried this:

http://codex.gallery2.org/index.php/Gallery2:Installation_on_a_SELinux_Server

but didn't work, I think it may work and my fault was not restarting Apache after making the changes suggested there (the page doesn't mention restarting Apache).

Then I decided I just wanted to disable SELinux for Apache so I went to:

http://fedora.redhat.com/docs/selinux-apache-fc3/sn-getting-started.html

and followed the steps, remember you have to restart Apache after making the change (they don't mention it either, it seems Apacha restart are implicit).

After doing that I was able to continue my installation.

Regards!

Alexis Bellido - Ventanazul web solutions