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.

permissions

Discussion in 'General Discussion' started by Hoss1, Oct 1, 2007.

  1. Hoss1

    Hoss1 Member

    Joined:
    Aug 9, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Hi all, new cPanel user at least on the whm side. I have a couple of permission questions.

    Running CentoS 5, cPanel Current, Apache 2.2.6, php5.2.4 with suphp and suexec thru Easy::Apache.

    Tried to install a couple php programs, wordpress, gallery and I think openads. During the installs for each i got some 500 server errors. Checking the error logs i saw entries similar to this.

    [Sun Sep 30 18:32:33 2007] [error] [client 71.207.66.122] SoftException in Application.cpp:231: File "/home/house/public_html/gallery/install/index.php" is writeable by group

    So I do a recursive chmod 755 on the directory and all is good with the install. This fix the other programs too. Is there a setting somewhere that I either screwed up or cant find that would fix this issue? So it wouldn't be writable by group in the first place?

    The other question is about the webserver write permissions. In the past while being a 'customer' at other webhosts with cPanel, I swear I recall that 755 level permissions didn't give the webserver write permissions on the files. I remember having to go in and change permissions to 777 when many configuration changes or to allow the webserver to write to the directory or file for whatever reason. But now on my own box I don't have to do this, apache has write access to everything. Is this an issue, did I screw up a setting?

    thanks
    H
     
  2. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,279
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    When you run suexec, you're causing the web server process to be run under each users' account, rather than under the 'nobody' account. It is when you aren't running suexec/suphp that your webserver will run all processes as [typically] 'nobody'. Then it is often necessary for the user to chmod his/her files 777 if the web server process is to be able to write to them. Since in an su environment the server is running as the user already, the webserver already typically has permisisons to write and as such you don't have to chmod 777 so that any user can write.

    I can speak of phpsuexec on Apache 1.3x, where you need to chmod 644 .php files and 755 directories and cgis.

    On my particular server (not recursively):
    /home - owned by root with 711 permissions
    /home/accountname - owned by accountname:nobody with 711 permissions
    /home/accountname/public_hml - owned by accountname:accountname with 755 permissions

    - php scripts - chmod 644
    - cgi scripts - chmod 755

    Mike
     
    #2 mtindor, Oct 1, 2007
    Last edited: Oct 1, 2007
  3. Hoss1

    Hoss1 Member

    Joined:
    Aug 9, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the explanation, things are clearer now.
    After a little bit better understanding and some more searching I do see you explained basically the same thing about a week ago. :eek:

    my permissions
    /home - owned by root:root with 711 permissions
    /home/accountname - owned by accountname:accountname with 711 permissions
    /home/accountname/public_html - owned by accountname:nobody with 750 permissions

    ok, after a little more testing the file permissions thing wont be an issue for me.
    I don't know why this is but, if I use winscp to sftp a file up it gives it 664 permissions.
    But if i copy the same file up using regular ftp(same login info) it sets the permission at 644, which is what it should be, I guess.

    H
     
  4. vavayi

    vavayi Member

    Joined:
    Aug 4, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks it works
    cd /home/user/public_html/plugin
    chmod 755 .(recursive)
     
Loading...

Share This Page