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.

perl permissions

Discussion in 'General Discussion' started by mosthost, Feb 7, 2008.

  1. mosthost

    mosthost Member

    Joined:
    Apr 12, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    I've wrote a perl script for writing a few pages to different account on my cpanel server. The problem is the perl script is on one account and it will not go back past the public_html dir. I need it to go back to any other users account on the server so I can write the pages there.

    I tryed chown the script to root but then it wouldn't run. How do you get a script to have access to all accounts on the server?
     
  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
    That's basic linux file security and in a shared environment that is simply something that's not allowed for obvious reasons. If you implicitly trust every account on the server and don't mind them all reading and writing to each others files, then you could disable SUEXEC and chown the scripts to run under nobody:nobody.
     
  3. mosthost

    mosthost Member

    Joined:
    Apr 12, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    So how do people use perl from an adminatration point of view?
     
  4. mosthost

    mosthost Member

    Joined:
    Apr 12, 2005
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Ok, i've tryed the sticky /etc/localdomains php script and that worked.

    I don't think I need it to run as root now I've seen that.

    What I want it to run as is the other account owner.

    Just say I have 2 accounts on cpanel.

    I want the perl script to be on one account and run from there. But I want the script to write some files to the 2nd accounts folder. It is fine for the username and password to be entered for the 2nd account to write to.

    It's a bit like a WYSIWYG html page maker for everyone on the server.

    I could just put it in their directory but then if I make changes to the script I have to replace the script in each account.

    Is this possable?
     
Loading...

Share This Page