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.

755 permissions problem ?

Discussion in 'Workarounds and Optimization' started by oldlock, Dec 21, 2012.

  1. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    I have many files and folders set by default to 755, the php software in question should be able to write to these files but keeps getting permission denied messages. PHP handler is DSO and ownership of the files is default account name : account name.

    I assume the problem at present is the PHP service is running as ' Nobody ' and as such does not have sufficient permissions to change the files. If I do a reccursive ownership change to account name : nobody will that fix the problem (and not create new issues !!)

    TIA for any input.
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    folders that need write access when running in DSO need to be 777
     
  3. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    Anyway to bulk change 755 to 777 ?
     
  4. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    Or should I change php handler ? Any pro's or cons to doing so ?
     
  5. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    I allready have Apache suExec enabled, if that should make any difference.
     
  6. bbrink68

    bbrink68 Active Member

    Joined:
    Nov 27, 2012
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Suphp is more secure, all files need to be 644 and folders 755. You could also install suphp fix to change all perms to their correct values before switching. I would not chmod anything to 777 that's in or beneath your public_html folder. That allows anyone to upload anything and execute it from that folder.
     
  7. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    Thanks, I'm seeing a little contradictory (and old) info on the best way to implement suphp and run the fix, do you happen to know of a suitable guide to do so ?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    649
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    suPHP is the default handler on new installations of cPanel. Using this option is probably the most flexible way of serving PHP requests and is generally very secure. You can find considerations for suPHP at:

    suPHP Considerations

    The following thread discusses the best routes to make the required permission and ownership changes:

    Switching to suPHP

    Thank you.
     
  9. oldlock

    oldlock Well-Known Member

    Joined:
    Sep 19, 2008
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    Thanks. I have made the switch to suphp and hopefully that will solve the issue. Interesting re it being the default though - when did that occur as both my servers were DSO.
     
  10. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    suPHP became the default PHP handler on all new cPanel installs in 2010. Existing installs were not affected, so you would not have noticed it if your server was first set up before then, but new installs have been using suPHP since then.
     

Share This Page