Managing owner user, group owner and other user permissions
Now, the question is how do we change the permissions for implementing security? The answer is the chmod command.
Let’s suppose we create a file named f_shobhit using the command touch f_shobhit. The default permissions attained by this file will be r w – r w – r - -. To change the permissions of the file f_shobhit using the numeric mode, execute the following command:
1. Now, execute the following command:
The user owner will not be able to use cat, vim and other commands on a file. Instead, the user will get a ‘Permission Denied’ error (see Figure 2). Although vim is meant for editing a file, due to no-read permissions, the contents will not be read by vim and so can’t be modified. Similarly, neither members of group shobhit nor other users will be able to read the file. 2. Now, add read permission to user owner: