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.

Nobody file ownership

Discussion in 'General Discussion' started by GOT, Nov 17, 2003.

  1. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    There is probably a simple method that I am missing here, but, here is my problem.

    I have a client that installed a PHP script. This PHP script created a couple of directories. Since PHP runs as nobody, the directories it created are owned by nobody. Now he wants to modify the files in nobody, but since he is not nobody (he is obviously somebody) the system will not allow him to do so sice it only gave permissions for the owner to modify. He also, obviously, cannot chmod ot chown them

    I know I can fix this as root, but that is really not the right answer. How can he modify this stuff on his own?

    Thanks!
     
  2. Damian

    Damian Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    There are two things you could do for this client.

    1- Enable phpsuexec on the server so that all PHP scripts will run under the users ID and create files/directories as that user instead of the web servers user "nobody".

    *I'd recommend some reading up on phpsuexec before enabling it. There are some items to be considered.

    2- Setup a cron as root to chown the directories and files every x minutes or as needed.
     
  3. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    I tried enabling phpsuexec once. It broke a number of things, so I went right back.

    The cron is a possibility I guess.
     
Loading...

Share This Page