September 11th, 1999, 07:08 PM
Hi,all ! I have a real quick question about Apach Authenicate with PHP. Ok...I would like to write a script that would delete a file in "MYDIR" and own by user "me" and group "myself." I set up Apache where it can takes my ID and password and I'm it. The problem is that it won't let me delete any file in "mydir" which is own by me? Any help please, thanks in advance!!!!!!!!!
September 17th, 1999, 11:47 AM
What username is Apache running under?
If it is running as your username I'm not sure what is wrong, however if it is running as user 'nobody' or 'webserver' or something like that then the files it is supposed to delete need to be owned by the same user.
September 17th, 1999, 04:52 PM
Thanks for the tip and the username is "NOBODY" of what Apache is running under. The reason I do NOT want to make the files owned by "NOBODY" is that if I have lots users logged in, and they can delete anything under someone's else you know..well, hope I express my idea clearly to you.
September 18th, 1999, 11:23 AM
There is nothing magic to the 'nobody' ID under a UNIX system. Files owned by that user are subject to the same protection as any other user's files and directories. That is, files cannot be deleted unless the directory permissions in which they reside allows them to do so.
It sounds as if you wish to run apache as a specific user, to avoid making directories world writable (which allows any user to delete files not owned by them). Fair enough. Apache does have the facility to do this; see your server's documentation for details.