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.

apache user nobody99

Discussion in 'EasyApache' started by jeffpoulsen, Nov 23, 2007.

  1. jeffpoulsen

    jeffpoulsen Registered

    Joined:
    Nov 23, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    We have had a problem running a php script that write a csv file. The error is permission denied. I found that in the phpinfo apache is running as the user nobody99(99). I am told that we need to have apache run as the user apache in order to fix this. I have two questions:

    1) Does changing the apache user to a more powerful user weaken security?

    2) How would I go about changing the user using WHM?

    I hope someone could shed some light on this for me.

    Thanks, jeff
     
  2. Amit Deshmukh

    Amit Deshmukh Well-Known Member

    Joined:
    Jul 1, 2007
    Messages:
    83
    Likes Received:
    0
    Trophy Points:
    6
    Apache

    You need check the following file and the permission of apache :-

    # pico /etc/passwd

    Regards,
    Amit
     
  3. madan.cpanelnet

    madan.cpanelnet Well-Known Member

    Joined:
    Apr 1, 2006
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    INDIA
    1) Quick fix.. you can apache with phpsuExec or mod_suphp which will then run all scripts as user:user

    But you must understand pros/cons of this... before doing it.


    Workaround
    ##########
    2)

    Please change the folder permissions to 777 where the php script write a csv file..


    example.. if the php script writes the csv file to /home/user/public_html/csv/

    change the permissons on folder to 777

    cd /home/user/public_html/

    chmod 777 csv/ -R


    You can do this from your file manager as well.


    all csv file will now be written inside folder /home/user/public_html/csv/

    say file1.csv , file2.csv
     
  4. inertz

    inertz Member

    Joined:
    Nov 24, 2006
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oklahoma City, Oklahoma, United States
    Auto chmod

    How to auto chmod for folder to 755 and file to 644
    I mean recursively.
    I try with chmod -R 755 folder
    then chmod -R 644 *.* but it wont work
     
  5. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    16
    Code:
    find -type d -exec chmod 755 {} \; 2>&1
    find -type f -exec chmod 644 {} \; 2>&1
    
    Make sure you are in the appropriate home folder before commencing. Eg;
    Code:
    cd /home/username
    
    before you run both those commands.
     
Loading...

Share This Page