Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Running php script as another user

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

  1. ircmaxell

    ircmaxell Member

    Mar 20, 2006
    Likes Received:
    Trophy Points:
    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

    Jun 15, 2002
    Likes Received:
    Trophy Points:
    Go on, have a guess
    You can only do that if you compile apache and PHP with phpsuexec enabled.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice