Linux study notes 14 Rights Foundation

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Permission based

Permissions: mechanism operating system restrictions on access to resources, generally divided into reading, writing, performing. Each file has a specific permission, by the user and the group to restrict what the user group, can be what kind of operation for a particular file.

Each process is run as a user process, authority and the user permissions, user rights is greater, the greater the process authority.

File permissions:
each file has three kinds of Rights:
r: read, read the contents of the file, list the contents of the directory;
w: write, can modify the contents of the documents, can create delete files in directory;
x: implementation, can be used as a command execution, can access the directory contents

UGO model:
U-User, G-Group, O-Other
every file permissions are set based on UGO.
permissions to a group of three, the corresponding UGO are respectively arranged.

Modify the file the user group: chown changes the file the user:
chown
-R: new old user user recursive modify directory of all documents

Chgrp changes the file group:
chgrp new user group, old group

Modify permissions for the
chmod schema file:
mode for the following format:
u, G, O respectively represent the user, group and other.
a can refer to ugo
+, add or delete the specified permission represents;
r, W, x represent three different permissions for the.
-R option: all documents recursive modify the directory.

Example:
chmod u+rw linuxcast.net
chmod g-x linuxcast.net
chmod a-x linuxcast.net

Permission is also available digital representation:
r=4 (2^2)
w=2 (2^1)
x=1 (2^0)
numerical permissions permissions, each group respectively and digital counterpart:
rw=4+2=6
rwx=4+2+1=7
r-x=4+1=5

The use of digital representation of Ugo permissions (Note: need to modify Ugo permissions):
chmod 660 linuxcast.net

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Ryan at November 10, 2013 - 6:34 AM