is_executable test
| From: | Rasmus Lerdorf | Date: | Sun, 11 Nov 2001 15:34:25 +0000 |
| Subject: | is_executable test | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-70115@lists.php.net to get a copy of this message | ||
Sascha, I don't understand this change you made:
http://cvs.php.net/diff.php/php4/ext/standard/tests/file/001.phpt?r1=1.3&r2=1.4&ty=h
Your second comment there states:
The 'test.file' is created by the script, thus the owner of the file is
the user id executing the script. A mode of 0654 does not grant the owner
the right to execute the file and therefore, the correct output here is
"not executable."
Given the fact that the script creates the test file, then both the owner
and the group of this file is going to match the owner and the group of
the user which will do the is_executable check. Thus I don't see why the
correct result here should be "not executable". A simple command-line
example:
% chmod 0644 test.file
% ls -la test.file
-rw-r--r-- 1 rasmus rasmus 46 Nov 11 07:26 test.file
% ./test.file
./test.file: Permission denied.
% chmod 0654 test.file
% ls -la test.file
-rw-r-xr-- 1 rasmus rasmus 46 Nov 11 07:26 test.file*
% ./test.file
4.2.0-dev
This test is currently failing because it is outputting "is executable"
for this case, which looks to me like it is correct.
-Rasmus