#1
  1. No Profile Picture
    toiwa
    Guest
    Devshed Newbie (0 - 499 posts)
    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!!!!!!!!!
  2. #2
  3. No Profile Picture
    moderator
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  4. #3
  5. No Profile Picture
    toiwa
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  6. #4
  7. No Profile Picture
    davidn
    Guest
    Devshed Newbie (0 - 499 posts)
    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.

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. Replies: 4
    Last Post: January 28th, 2004, 08:29 AM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo