Whether you are a Linux administrator or a developer working with Linux OS, changing the permission of the folder is a inevitable task and is one that you would encounter on a daily basis. This is because the file permission could adversely affect the functioning of any program in the Linux kernel. We will be looking at Ubuntu Set Full Permission on Folders today.
Only if there are sufficient permissions and access over the folders, the programs can execute, copy or work with files as and when required. One of the most faced scenarios is the requirement to apply full permission to the folders until the required operation/task is performed in the Linux system.
Though it is not always a recommended method to provide full permission to the folders as it may expose some of the critical files and can cause serious security issues, providing full permission for a interim time period would be fine in order to get things done quick in Linux programs.
To provide full permission to a folder in Linux, enter the following command in the shell terminal:
chmod -R 777 folderName
Here we use the option -R which means the full permission is provided not only to the mentioned folderName but also to all the folder and sub folders present inside the specified folderName.
If you want to apply full write permission only to the specified folderName and not to the sub folder, you can omit this option (-R) and enter the command without it:
chmod 777 folderName
If you want to apply full permission to folders and files inside the specified folderName and not for the specified folderName, then you will need to navigate into the folder using the cd command and then enter the chmod command like the following:
cd folderName chmod -R 777 *
Here the * denotes all the files and folders that are present inside the current directory and the -R as discussed before will apply the full permission to all the folders and sub folders recursively.
Once you have applied full permission to a file or folder, it will be highlighted in green like the following: