#12699 [Com]: opendir() fails when used on read-only devices

From: Date: Tue, 29 Apr 2003 18:54:24 +0000
Subject: #12699 [Com]: opendir() fails when used on read-only devices
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38759@lists.php.net to get a copy of this message
ID: 12699 Comment by: par at parwebworks dot net Reported By: sebastian@php.net Status: Closed Bug Type: Directory function related Operating System: Win32 PHP Version: 4.0CVS-2001-08-11 New Comment: Just noticed the topic is closed but... It indeed is a security issue. On my server (win2k) I get the same error as the original author who has this problem. When using IIS (which I think he is), the IUSR_GUEST (wrong spelling but check your security rights on a directory it's something like that) needs read permissions on a folder for php to be allowed to access it. It's weird though that php generates this weird error rather than say "permission denied" which I would find a lot more obvious.. but then again, who would run IIS and php right? When using my C:/inetpub/wwwroot as folder, the opendir works just fine and that has IUSR_guest access... just fool around with those permissions and I'm sure you'll get it to work. Previous Comments: ------------------------------------------------------------------------ [2002-11-11 17:59:04] xenosis2000 at hotmail dot com By the way.. I still can't get it to work.. help appriciated. ------------------------------------------------------------------------ [2002-11-11 17:58:26] xenosis2000 at hotmail dot com I ran into something similar with trying to OpenDir to a mapped network drive. Variable Define: $logpath = "s:\dir\System\"; Use it: $handle=opendir($logpath); Error: Warning: OpenDir: Invalid argument (errno 22) in logs.php on line 45 ------------------------------------------------------------------------ [2001-10-02 18:38:38] sniper@php.net No feedback, considered fixed. (naughty, naughty Sebastian.. :) ------------------------------------------------------------------------ [2001-08-13 05:26:59] phildriscoll@php.net Sorry - that last line should read: *if* you set up DocumentRoot to point to it. ------------------------------------------------------------------------ [2001-08-13 05:23:02] phildriscoll@php.net Just tested with Apache (version 1.3.12) on my NT box, and it's still ok. It's a mystery to me what the permissions are on a read only device, however I would guess that since php is running in the same security environment, if it is a security issue, then you might find that Apache can't serve up files directly from the CD is you set up DocumentRoot to point to it. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/12699 -- Edit this bug report at http://bugs.php.net/?id=12699&edit=1

« previous php.bugs (#38759) next »