OpenSource For You

Managing owner user, group owner and other user permission­s

-

Now, the question is how do we change the permission­s for implementi­ng 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 permission­s attained by this file will be r w – r w – r - -. To change the permission­s 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 permission­s, 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:

Newspapers in English

Newspapers from India