Re: unlink() & rmdir() ... Problems.
| From: | John Nichel | Date: | Tue, 24 Aug 2004 18:30:03 +0000 |
| Subject: | Re: unlink() & rmdir() ... Problems. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-194618@lists.php.net to get a copy of this message | ||
PHP Junkie wrote:
Ave, Apache to the best of my knowledge runs as "nobody" by default and since I didn't change any settings, it is probably running as "nobody". This is what I got with ls -al rahul:/Library/WebServer/Documents/informed-sources.com/imsafm bob$ ls -al total 16If Apache is running as nobody/nobody, it does not have permission to delete these directories. The only users who can delete these directories are the respective users, and root. You need to have write permission to delete...drwxrwxrwx 5 nobody nobody 170 24 Aug 13:55 . drwxrwxrwx 102 bob unknown 3468 24 Aug 11:23 .. -rw-rw-rw- 1 bob unknown 6148 24 Aug 13:57 .DS_Store drwxr-xr-x 3 www www 102 24 Aug 11:05 bobkasper drwxr-xr-x 3 www www 102 24 Aug 11:09 rjohariNow you see the last 2 folders... "bobkasper" and "rjohari". These are 2 users created by the admin. If I delete a user, their corresponding folder should be deleted as well, which is what I am trying to achieve. But if, let's say, I delete the user "rjohari"... The folder still remains. Thanks for helping...
drwxr-xr-x 3 www www 102 24 Aug 11:09 rjohariIn the above, the 'd' means directory, the next three letter are the user's permissions (full, read/write/execute), next three characters (r-x) are the group's permissions (read/execute), and the last three are other's (world) permission (read/execute). The two 'www' are the owner (user) and group. For the directory rjohari, only root and the user www can delete and/or write to this directory. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com