step 4 - The directory you entered is read only

tungpoon

Joined: 2004-12-19
Posts: 4
Posted: Sun, 2004-12-19 10:49

Hi, I am a newbie in linux, apache and gallery..

I downloaded the gallery and run it.. everything goes fine until step 4..

I have followed the stepes

$ mkdir /var/www/html/album
$ chmod 777 /var/www/html/album

but It keep returning
The directory you entered is read only

8 drwxrwxrwx 2 root root 4096 Dec 19 21:24 album
8 drwxr-xr-x 12 1000 80 4096 Dec 19 21:09 gallery2

but it should be read-able and write-able

the owner of album is root

I am able to go to
http://tpoon
http://tpoon/gallery2
and
http://tpoon/album
so, I think it is not my apache problem

and I am using Gallery 2 Alpha-4

Thanks,

Tung

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-12-20 04:50

are you in a virtual/chroot type of environment? ie, is it possible when you do mkdir /var/www/html/album that the real location on the server is something like /users/tpoon/var/www/html/album ?
can you post your phpinfo or a link to it?

 
tungpoon

Joined: 2004-12-19
Posts: 4
Posted: Mon, 2004-12-20 11:57

Thanks for replying mindless..
I think i am notnot in the virtual/chroot of environment
when I typed 'cd /var'
and then i typed 'pwd'
then it return /var

How can i get my phpinfo ?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-12-20 16:32

for phpinfo make a phpinfo.php with
<?php phpinfo(); ?>

for chroot check make a test.php with
<?php print getcwd(); ?>
and make sure the value you see in your browser matches what you see from the command line.

 
tungpoon

Joined: 2004-12-19
Posts: 4
Posted: Tue, 2004-12-21 05:44

Thanks, I am not working in a chroot enviroment...

and here is my phpinfo
http://tung.kicks-ass.org/phpinfo.php
http://tung.kicks-ass.org/test.php

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2004-12-22 04:30

Just tried those urls now and they timed out for me. Is the server up?

 
tungpoon

Joined: 2004-12-19
Posts: 4
Posted: Wed, 2004-12-22 11:11

the server's up again, sorry bharat

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2004-12-24 23:29

I tried again and the server was offline. My timing stinks. :-/

 
sabatocd

Joined: 2005-09-22
Posts: 3
Posted: Thu, 2005-09-22 19:07

I am having the same problem. Has anyone solved this?

Quote:
/usr/local/home/dante/staff/csabato/public_html/gallery2/g2data
The directory you entered is read only

As you can see below it has full access

drwxrwxrwx+ 2 csabato 96 Sep 22 11:31 g2data

php info:
http://www.willamette.edu/~csabato/gallery2/phpinfo.php

 
valiant

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

what is the result of this script? put it into a gallery2/install/test.php file and browse to it.
<?php var_dump(is_writeable('/usr/local/home/dante/staff/csabato/public_html/gallery2/g2data')); ?>

 
sabatocd

Joined: 2005-09-22
Posts: 3
Posted: Thu, 2005-09-22 21:18

var_dump(is_writeable('/usr/local/home/dante/staff/csabato/public_html/gallery2/g2data'));

returns false any idea why?

 
valiant

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

please try mindless' post from Posted: Mon, 2004-12-20 18:32

Quote:
for chroot check make a test.php with
<?php print getcwd(); ?>
and make sure the value you see in your browser matches what you see from the command line.

 
sabatocd

Joined: 2005-09-22
Posts: 3
Posted: Thu, 2005-09-22 21:40

I appriciate your help.

the "phpinfo.php" page posted above contains that information at the top.
http://www.willamette.edu/~csabato/gallery2/phpinfo.php

values do not match...
web value: /usr/local/home/dante/staff/csabato/public_html/gallery2
shell value /home/dante/staff/csabato/public_html/gallery2

things I've tried
1)
chmod 777 /home/dante/staff/csabato/public_html/gallery2/g2data

2)
cd /home/dante/staff/csabato/public_html/gallery2
pwd (result: /home/dante/staff/csabato/public_html/gallery2)
chmod 777 g2data

3)
chmod 777 via wsftp

both ftp and shell show the folder g2data with permissions of drwxrwxrwx+ but alas the file is not seen as writable by php.

??????

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2005-09-22 22:16

very odd.. you might try is_readable on g2data, and both is_readable/is_writeable on all parent dirs up to / to see which give the value you expect and which don't..