php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #19648 fopen() and current user
Submitted: 2002-09-28 08:56 UTC Modified: 2002-09-28 13:58 UTC
From: raz0 at worldonline dot dk Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.2.2 OS: GNU/Linux or any Unix variant
Private report: No CVE-ID: None
 [2002-09-28 08:56 UTC] raz0 at worldonline dot dk
fopen() uses the user running PHP to open the selected file.
This causes problems when you e.g. make a filemanager. All
files created with the filemanger will be owned by the www user and chmod'ed to 644. On the other side, the filemanger
cannot alter files as they are (mostly) owned by the user (e.g. raz0). This makes it quite hard to make useful filemanger. Other commands like unlink() and rmdir() don't
bother whether the files are owned by one or another user.

Is there someway you can fix this?

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-28 09:04 UTC] sander@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php
 [2002-09-28 09:08 UTC] raz0 at worldonline dot dk
I know its not a bug, thats why I put it under:
Feature/Change Request :)

Well, if you can't answer the question, can you tell me
where I can get an answer then? :)
 [2002-09-28 13:58 UTC] hholzgra@php.net
this is just how the unix security model works,
only owner and root can chmod files
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Aug 14 14:01:29 2024 UTC