Welcome to TopTechSteps, Let's learn together

Linux Basic File Permissions

Toggle Post Content Toggle Post Content


To add a user:
To assign password to user linux:

Password file storage location:

user:password:useridgroupid:comment:home directory:user:shell

Create a user with a customized user ID:

Give identification to user
By doing this, only an entry is added in the 5th column of the /etc/passwd file. This allows us to identify the corresponding user.
Let's take an example manager using linux account

Change username

Change the default file permission of a particular user:

Go to the home directory of the user and check the present default file permissions. Then edit the .bashrc file


umask value calculation:
Normally, the umask value is subtracted from 666 for files and 777 for directories. Now, the umask value in the .bashrc file is set to 002
Then the file permission is 666-002=664(-rw-rx-r--)
The 'source' command is used to update the file so that the changes take effect.
then create a file and see the changes in the permissions(between test and test1)

How to set the default permissions globally:
edit the file /etc/bashrc

changing home directory of user:

How to change userid:

How to change groupid:

No comments:

Post a Comment

Ad space

Responsive Advertisement

I am here to help you...

View count