Frequently Asked Questions

How to change permissions and ownership of files recursively

To change files or folders on a Linux server, you typically use a command line program like Putty or Tera Term. in your WHM it's called a terminal and in cPanel it's the SSH tool. All of these allow for commands to run once you're logged in.

To change file permissions recursively you would run a command like this: 

chmod -R MODE DIRECTORY

MODE would be the permissions and the directory is where the changes will start. For example:

chmod -R 755 /home/username

To change file ownership recursively you would run a command like this: 

chown -R <owner> <folder_1> <folder_2>

An example would be: 

chown -R username /home/username

There's more options with chmod and chown, but this will get 99% of what needs to be done when using these tools.

  • chown, chmod, permissions, recursively

Was this answer helpful?

60 Users Found This Useful