|
Written by Deepak K.C.
|
|
Monday, 22 June 2009 06:30 |
|
Page 1 of 4 What is file permission? File permission is the privilege that a user gets to access the file depending on the need and the level of the user.Access to the file or group of files can be controlled. There are 3 types of access: Depending on the requirements and the level of user we set up access to certain files. Each file belongs to a specific user and group. We can set permissions so that the owner or a certain group or user can modify, certain group can only read while the rest cannot access.
Why do we need to setup file permission?
You are likely to come across the problem that sometimes you yourself can't access some files on your own linux system. Its due to the mis-configured file access permission. My experience: I have waisted almost more than 1 hr after setting up the apache server. I was unable to write(modify ) any file from the /var/www directory. File permission sometimes can be frustrating even though its crucial for a secure system.File permissions help to keep our important files safe from others as well as from our own mistakes.
What is file owner ship?
Every file or directory on your linux system is owned by a specific user and group. File permissions are defined separately for different users, groups and others.
- User: The username of the person who owns the file. By default, the user who creates the file will become its owner
- Group: The usergroup that owns the file. All users who belong into the group that owns the file will have the same access permissions to the file. This is useful if, for example, you have a project that requires a bunch of different users to be able to access certain files, while others can't. In that case, you'll add all the users into the same group, make sure the required files are owned by that group, and set the file's group permissions accordingly.
- Other: A user who isn't the owner of the file and doesn't belong in the same group the file does are termed as others. Others can also be termed as the rest of the world. We have to be very careful while assigning permissions to others.
|
|
Last Updated on Wednesday, 24 June 2009 11:27 |