|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-03-15 15:53 UTC] gobzo at netscape dot net
[2004-03-15 23:05 UTC] sniper@php.net
[2004-03-24 16:19 UTC] gobzo at netscape dot net
[2004-03-24 16:33 UTC] wez@php.net
[2004-04-30 05:52 UTC] quentinjs at canada dot com
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 23:00:01 2025 UTC |
Description: ------------ I experience a situation, where Apache runs under the user name, who does not have rights to write to a certain directory. This has been tested and found working: I logged in under that user and received Access denied error trying to save a changed file in this folder. The problem is that if I call is_writable() against files in that folder (and the folder itself!), it will return true which it utterly wrong. Of course, subsequent writes to the files fail because the files in fact can not be written to, but the scripts do not know about that. My wild guess would be this is Windows or WinXP related issue, I do not have a Linux box to check, but if needed, I can set it up - just email me. Reproduce code: --------------- 1. Create a folder 'foo' and file 'bar' in that folder. 2. Create a new user User1 and assign his rights to a folder 'foo' so that his Allow/Write is unchecked. 3. Run Apache under this user. 4. Create ./foo.php with the following code: <?php if (is_writable("bar")) echo "Writable"; else echo "Read only"; ?> 5. Go with your browser to localhost/foo.php Expected result: ---------------- Writable Actual result: -------------- Read only