|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-09-11 05:12 UTC] tamas at mile dot hu
fopen("x.txt","r");
Gives a warning:
Warning: utime failed: Operation not permitted in test.php
This error wasn't in the 4.2.2
The owner of the x.txt and the test.php is same as (akcio)
(There is chmod 777 on the x.txt and the on the directory)
The owner of the apache process is nobody (uid 99)
I made a patch into the safe_mode.c becase with this the users can open the uploaded files next time.
With this patch if I change the owner of the x.txt to nobody (uid99) it will works fine.
...
} else {
uid = sb.st_uid;
gid = sb.st_gid;
if (uid == php_getuid()) {
return 1;
} else {
/* Miletics Tamas -M.T.-*/
if (uid == 99) { return 1; }
if (PG(safe_mode_gid) && (gid == php_getgid()))$
return 1;
}
}
}
...
php_error(E_WARNING, "Unable to access %s", filename);
return 0;
}
duid = sb.st_uid;
dgid = sb.st_gid;
/* Miletics Tamas -M.T.- */
if (duid == 99) {return 1;};
if (duid == php_getuid()) {
return 1;
} else if (PG(safe_mode_gid) && dgid == php_getgid()) {
return 1;
} else {
TSRMLS_FETCH();
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 00:00:01 2025 UTC |
After a little localization i've found the message is coming from this section: ret = VCWD_UTIME(Z_STRVAL_PP(filename), newtime); if (ret == -1) { php_error(E_WARNING, "utime failed (debug 1): %s", strerror(errno)$ RETURN_FALSE; } RETURN_TRUE; So the bug is in the VCWD_UTIME(Z_STRVAL_PP(filename), newtime); function.