php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23540 is_dir (et al) seems confused by Sharity filesystem.
Submitted: 2003-05-08 01:51 UTC Modified: 2003-05-08 02:21 UTC
From: jp at kole dot com Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 5CVS-2003-05-08 (dev) OS: RedHat 8.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jp at kole dot com
New email:
PHP Version: OS:

 

 [2003-05-08 01:51 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-08 02:21 UTC] alan_k@php.net
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..


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC