Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to set CHMOD permissions automatically?

Discussion in 'Security' started by Galanthus, Nov 15, 2013.

  1. Galanthus

    Galanthus Well-Known Member

    Joined:
    Nov 8, 2013
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi guys,

    I am almost finished setting up my FTP settings. But i have a problem. When i create an account in WHM the directory permissions are set to "542 543"how can i set this to 755? and to files like 644?

    Because some sites wont work with these permissions. So instead of having to change it manually how can i fix this?

    Thanks in advance!

    Currently using: proFTPD
     
  2. iserversupport

    iserversupport Well-Known Member

    Joined:
    Nov 4, 2013
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    You can correct the permission automatically for files using the command

    - removed -

    Make sure to tun it inside the folder public_html after ssh into the server

    - - - Updated - - -

    To fix the permission of folders you can use

    - removed -

    Make sure to run it inside /home/username/public_html/
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 iserversupport, Nov 16, 2013
    Last edited by a moderator: Nov 16, 2013
  3. Galanthus

    Galanthus Well-Known Member

    Joined:
    Nov 8, 2013
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi sir!

    Thank you very much as always you are helpful. I only need to ask you how i can set this to GLOBAL settings? so for each account which s created that will have this permissions 755 and 644?
     
  4. Galanthus

    Galanthus Well-Known Member

    Joined:
    Nov 8, 2013
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    F*** i made a mistake i did 644 in ROOT? how can i return this action?
     
  5. iserversupport

    iserversupport Well-Known Member

    Joined:
    Nov 4, 2013
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    It should be global by default. You just have to correct permission for existing wrong files and folders
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Galanthus

    Galanthus Well-Known Member

    Joined:
    Nov 8, 2013
    Messages:
    87
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I have CHMOD system files in ROOT directory how can i set back from 644? wat is default?
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,472
    Likes Received:
    421
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:

    You posted the WRONG instructions and have helped this user to make a mess of his system.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. iserversupport

    iserversupport Well-Known Member

    Joined:
    Nov 4, 2013
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Actually i have already mentioned in the post twice to run it inside public_html only
    But he did it from wrong location
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice