ID:               49049
 User updated by:  rusxakep at gmail dot com
 Reported By:      rusxakep at gmail dot com
 Status:           Open
 Bug Type:         Filesystem function related
 Operating System: Linux 2.6.29
 PHP Version:      5.2.10
 Assigned To:      fb-req-jani
 New Comment:

I'm not guru in php development, but

access("/home/1/2/3", F_OK)             = -1 EACCES (Permission
denied)
stat64("/home/1/2", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0

why stat64("/home/1/2"), but no stat64("/home/1/2/3")?
why "permission denied" placed here with using set execution bit
feature?


Previous Comments:
------------------------------------------------------------------------

[2009-07-24 16:34:47] rusxakep at gmail dot com

and first run with strace:

access("/home/1/2/3", F_OK)             = -1 ENOENT (No such file or
directory)
stat64("/home/1/2", 0xbf9bd910)         = -1 ENOENT (No such file or
directory)
stat64("/home/1", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) =
0
mkdir("/home/1/2", 0700)                = 0
mkdir("/home/1/2/3", 0700)              = 0)

------------------------------------------------------------------------

[2009-07-24 16:10:34] rusxakep at gmail dot com

Sorry, previous strace has been invalid.

Correct:

munmap(0xb7ef5000, 4096)                = 0
access("/home/1/2/3", F_OK)             = -1 EACCES (Permission
denied)
stat64("/home/1/2", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
mkdir("/home/1/2/3", 0700)              = -1 EEXIST (File exists)
write(1, "\nWarning: mkdir(): File exists in"..., 61
Warning: mkdir(): File exists in /home/1/test.php on line 3
) = 61
close(2)                                = 0
close(1))

------------------------------------------------------------------------

[2009-07-24 15:59:59] rusxakep at gmail dot com

Strace output:

lstat64("/home", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/home/1", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=4096, ...}) =
0
lstat64("/home/1/test.php", {st_mode=S_IFREG|0755, st_size=92, ...}) =
0
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf9f2638) = -1 ENOTTY
(Inappropriate ioctl for device)
read(3, ""..., 4096)                    = 0
read(3, ""..., 8192)                    = 0
close(3)                                = 0
munmap(0xb7fd6000, 4096)                = 0
access("/home/1/2/3", F_OK)             = -1 EACCES (Permission
denied)
stat64("/home/1/2", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
mkdir("/home/1/2/3", 0700)              = -1 EACCES (Permission
denied)
write(1, "\nWarning: mkdir(): Permission den"..., 67
Warning: mkdir(): Permission denied in /home/1/test.php on line 3
) = 67
close(2)                                = 0
close(1))

------------------------------------------------------------------------

[2009-07-24 15:55:14] rusxakep at gmail dot com

Now replace 0700 flags to 0777 for testing ...
Strange it. Working ....

I'm using "set execution bit" feature, why 0700 doesn't work?)

------------------------------------------------------------------------

[2009-07-24 15:48:43] rusxakep at gmail dot com

No. Isn't.

This problem only under unprivileged user with set user or group
execution bit.

Under "root" user working fine.)

------------------------------------------------------------------------

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/49049

-- 
Edit this bug report at http://bugs.php.net/?id=49049&edit=1

Reply via email to