How to Set CHMOD Permissions on cPanel Server?

  • How to Set CHMOD Permissions on cPanel Server?

    In this guide, you can learn step by step how to set the appropriate CHMOD permissions for files and directories through cPanel. CHMOD permissions determine who can access your files and what actions they can take. By setting the correct permissions, you can increase the security of your server and keep your website running smoothly.

    How to edit cPanel file permissions from SSH?

    Let's access our server with the PuTTY program, after accessing, let's log in to the directory of the cPanel user account where we will edit the file permissions with the following command. You will type your cPanel username in the section that says 'cpanelusername'. For example; cd /home/jetto/public_html

    Code
    cd /home/cpanelusername/public_html

    Now that we are logged into the public_html directory, let's run the following 2 commands respectively.

    Code
    find . -type f -exec chmod 644 {} \;
    Code
    find . -type d -exec chmod 755 {} \;

    That's it, now our file permissions are set as they should be. If you need to define a special permission other than 644 or 755 permissions, you must specify the file name.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!