#23540 [Opn->Bgs]: is_dir (et al) seems confused by Sharity filesystem.
| From: | alan_k@php.net | Date: | Thu, 08 May 2003 07:21:22 +0000 |
| Subject: | #23540 [Opn->Bgs]: is_dir (et al) seems confused by Sharity filesystem. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39284@lists.php.net to get a copy of this message | ||
ID: 23540
Updated by: alan_k@php.net
Reported By: jp at kole dot com
-Status: Open
+Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: RedHat 8.0
PHP Version: 5CVS-2003-05-08 (dev)
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
Looks like www-user or httpd user does not have privaliges to browse
the mounted filesystem..
try su'ing as httpd and see if you can read files..
Previous Comments:
------------------------------------------------------------------------
[2003-05-08 01:51:29] jp at kole dot com
I'm running RedHat 8.0 and Apache 2.0.45.
I'm trying to make Gallery (http://gallery.menalto.com/index.php) 1.3.3
work
with a folder mounted from my Win2000 box to the
Linux box using the Sharity
daemon(http://www.obdev.at/ftp/pub/Products/Sharity/binaries/redhat-rpms/sharity-home-2.8-2.i386.rpm).
This Sharity daemon allows my Win2000 shared folder to
appear as a normal filesystem on my Linux box. As a normal
user I can see the folders and access the files within them.
This code:
# cat -n test.php
1 <?php
2 $name="/JPs_Photos";
3 echo "$name being used...<br>";
4 $dir = opendir($name);
5 while($entry = readdir($dir))
6 {
7 if(is_dir($entry))
8 echo "$entry is a dir<br>";
9 else
10 echo "$entry is NOT a dir<br>";
11 }
12 ?>
Yields this output:
/JPs_Photos being used...
Warning: opendir(/JPs_Photos): failed to open dir: Permission denied in
/home/www/htdocs/gallery/setup/test.php on line 4
Warning: readdir(): supplied argument is not a valid Directory resource
in /home/www/htdocs/gallery/setup/test.php on line 5
Yet, I can see/access this directory while on linux:
# ls -ald /J*
drwxrwxrwx 2 root root 131072 May 8 01:01 /JPs_Photos
# ls -ald /JPs_Photos/index.html
-rw-rw-rw- 1 root root 4621 May 3 10:40
/JPs_Photos/index.html
# od /JPs_Photos/index.html | head -1
0000000 064074 066564 037154 036012 020141 071150 063145 031075
FYI:
# ps -eaf | grep sharity
root 18212 1 0 May05 ? 00:00:06
/opt/sharity/sbin/sharityd -f /o
# /usr/local/bin/php -v
PHP 4.3.2-RC3-dev (cli) (built: May 8 2003 00:38:06)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
PHP build line:
./configure --with-mysql --with-apxs2=/var/www2/bin/apxs
Thanks and regards,
jpkole
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23540&edit=1