Chmod 777 permission - Chmod 777 to a folder and all contents
In this tutorial I am going to show you the use of the chmod command for changing the folder, subfolders and all files inside the folder permission to 777. The chmod command is used to manage files and folder permissions in Linux. This command allows the admin/users to add/update permissions to files and folders.
What is the chmod command in Linux?
The chmod is a command that comes by default with the Linux operating system. This util is used to change the access permission of files and folders.
chmod [options] directory or file
This utility can be used to change the access permission of a file or group of files, it can also be used to change the access permission of a directories.
How to Chmod 777 to a folder and all contents?
Suppose you have a directory called data and inside the data directory there are many directories. Each directory might contain many files and many sub-directories. So, in this case you want to give 777 permission to all all the files and directories under the data directory.
For this you can run following command in the terminal:
> chmod 777 -R data
> chmod 777 -R ./
Here -R is for recursive, you can also use ?--recursive?.
Above command is very powerful and it gives 777 access permission to all the files and subdirectories under the data directory.
The chmod command is a very handy command in the hands of the Linux users and
admin to manage the files/directories permissions as per business requirements.
This command can be executed in the terminal.
If you are in some other directory you can provide a full path in the chmod command. Here is example:
> chmod 777 -R /home/myuser/data
Above command will change the permission of /home/myuser/data directory to 777 recursively. There are many ways people are using this command for managing their file permissions in the Linux operating system.
Linux is very popular operating system for running server-side applications and also used as popular desktop in the enterprises. You can find many tutorials at Linux Tutorials section.