The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Running php script as another user

Discussion in 'General Discussion' started by ircmaxell, Jul 19, 2006.

  1. ircmaxell

    ircmaxell Member

    Joined:
    Mar 20, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I have a file management program (in php) that I want to include in the front end of my main site. I have it set up to limit the directory to the signed-in user's home directory. The problem I have is that right now, I can only get it to run as 'nobody', which will write any of the files in the user's directorys as nobody:nobody. This is a problem for what I want to do... I need to be able to set the user to which the files are accessed and created (the user will change with the login) within the php file. I can't seem to find anything like this with a google search... Any help is much appreciated. Thanks
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can only do that if you compile apache and PHP with phpsuexec enabled.
     
Loading...

Share This Page