#19354 [NEW]: utime (fopen) error in safe mode

From: Date: Wed, 11 Sep 2002 10:12:16 +0000
Subject: #19354 [NEW]: utime (fopen) error in safe mode
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19023@lists.php.net to get a copy of this message
From: tamas@mile.hu Operating system: Linux Slackware 8 PHP version: 4.2.3 PHP Bug Type: *General Issues Bug description: utime (fopen) error in safe mode 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(); -- Edit bug report at http://bugs.php.net/?id=19354&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19354&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19354&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19354&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19354&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19354&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19354&r=support Expected behavior: http://bugs.php.net/fix.php?id=19354&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19354&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19354&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19354&r=globals

« previous php.bugs (#19023) next »