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.

Allow one php script to run as root

Discussion in 'General Discussion' started by Vincent Site47, Jun 6, 2015.

  1. Vincent Site47

    Vincent Site47 Registered

    Joined:
    Jun 6, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Hi all!

    I have one WHM setup with different users. I would like one of this users / accounts to have write access to all the other accounts. how can I grant root access to this particular user, in fact, to a particular php script.

    This scripts need to move a file to the public_html folder of the other accounts.

    I'm open to other solutions, Was investigating the possibility of using whm php environment which sounds like it is running under root. But don't know if this would remain after a whim update. And don't event know if this is possible at all.

    I could put the file under a temp folder with the destination folder in a temporary text file, and run a cron job under root to look at this folder and move the files accordingly, but this sounds overkill to me.

    Anybody has an idea how to solve this?

    Thanks!
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    This does not seem like a secure solution. Have you considered simply setting up a script under "root" and have files copied over to specific accounts a set times through a cron job?

    Thank you.
     
Loading...

Share This Page