This post describes configuring files and folder permissions in Ubuntu Linux.
Setting file and folder permissions Ubuntu Linux should be the same as any modern operating system. You can use file permission to control who should have access to files you own. You won’t be able to set permissions on files and folders you don’t already own or have access to.
To view and set the permissions for a file, right-click it and select Properties, then select the Permissions tab.
There are three groups or classes you can set permissions for. Owners, Group, and Others. You’re automatically going to be the owner of the files you own. The group will also be assigned to your account, and Others might have read-only.
If you want to protect the file from accidental deletion, you can give yourself read-only permission so you don’t delete it mistakenly.
How to set file permissions Linux Ubuntu
Whether at home or in a corporate environment, the best method to manage file permissions is to assign them to groups. You can set the file’s group and control the permissions for all users in that group. You can only set the file’s group to your group.
If the file is a program, such as a script, you must select Allow executing file as a program to run it.
For files you want to restrict, go to the folder step below to set the folder permissions.
How to Set folder permissions in Ubuntu Linux
You can set folder permission for Owners, Groups, and Others. Permissions for files and folders are slightly different. Below are permission types you can set on folders.
The permission settings on the folders control files in folders.
The user will not even see what files are in the folder.
List files only
The user will be able to see what files are in the folder but cannot open, create, or delete files.
The user can open files in the folder (provided they have permission to do so on the particular file) but will not be able to create new files or delete files.
Create and delete files.
The user will have full access to the folder, including opening, creating, and deleting files.
So, when settings permissions on the file, it’s best to do it at the folder level. You can restrict access to files at the file level, but it might not be the best way to do so. Always set it to the folder the file is stored in.
You can also quickly set the file permissions for all the files in the folder by clicking Change Permissions for Enclosed Files.
That should do it!