SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Location
    Rawalpindi, Pakistan
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am using the following code for creating directory ($dir in $parent). It gives permission denied error, I have tried CHMOD also but with same result, how can we create directory or file thru PHP?????


    echo "Create directory " . $dir . " in " . $parent;
    if (mkdir($parent.$dir, 0666)){
    echo ("Directory created successfully");
    }

    I may have to be log on to the site as admin, if yes then how can I achieve that........

    Thanx
    Aatif Malik

  2. #2
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I ran into the same thing the other day after setting up a new linux box in our office running apache. apache running as

    user nobody
    group nobody

    and php script owned by

    user joe_blow
    group marketing

    I added the user joe_blow to nobody group and
    all was well.

    hope that helps..

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Location
    Rawalpindi, Pakistan
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by bneal
    and php script owned by

    user joe_blow
    group marketing

    I added the user joe_blow to nobody group and
    all was well.

    hope that helps..

    Thanx 4 help...

    but how can we run any script owned by some user??

    Aatif Malik

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here's what I did. (forgive me if I'm way off and someone that knows more about this feel free to jump in)

    I created these scripts in
    a directory owned by

    user joe_blow
    group marketing

    apache server, starts as root user and then runs as user nobody

    if you add the user nobody to the group marketing, nobody
    now has permision to write to directories owned by group
    marketing.

    sorry if I'm not all that clear here.

    --- edit --
    looking at my original post, my information a little backwards. I'm new at this and apologize..

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Location
    Rawalpindi, Pakistan
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I'm no expert of *nix, but I think any one accessing thru the web will be logged in as anonymous user, how can we change that to any *nix user, I have done that in NT machines, but dont know about *nix, tried .htaccess and .htpasswd but they are separate users from o.s (not like NT)

    Any comments and suggestions are welcome.

    Thanx.

    Aatif Malik


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
  •