SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: mkdir - nobody

  1. #1
    Resistance is Futile webgodjj's Avatar
    Join Date
    Nov 2002
    Location
    Madison, WI USA
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mkdir - nobody

    I am having some OWNERSHIP problems here... I am on a shared server. I have a script that creates directores like usch
    PHP Code:
    if(!file_exists('images'))
    mkdir('images',0711); 
    Now when I view the properites (ls -l) I find that the ownership is set to nobody.

    How do you make the script run as the user, not nobody?

    drwx--x--x 3 nobody nobody 4096 Dec 28 10:27 images

  2. #2
    Super Ninja Monkey Travis's Avatar
    Join Date
    Dec 2001
    Location
    Sioux City, Iowa
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its doing that because Apache is running as the nobody user. I believe Apache 2 fixes this problem but that will not be much help to you on a shared server. You might be able to use exec() to run a command as another user but I'm not entirely sure.
    Travis Watkins - Hyperactive Coder
    My Blog: Realist Anew
    Projects: Alacarte - Gnome Menu Editor


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •