Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Permissions and attributes of files and directories under Linux     - OpenCV 3.0 + Python 2.7 installation and testing under Ubuntu 14.04 (Linux)

- SQL Server memory Misunderstanding (Database)

- Linux System Getting Started Tutorial: Installing Git on Linux (Linux)

- The method of installing software under Ubuntu Linux (Linux)

- The file name is garbled or deleted files with special characters under Linux (Linux)

- To deploy MySQL database with separate read and write OneProxy (Database)

- Hadoop 2.0 Detailed Configuration Tutorial (Server)

- To install and configure the Jetty server and JDK under Ubuntu 14.04.2 (Server)

- Necessity in Java packages (Programming)

- Android working with Volley Comments (Programming)

- Java Foundation - Variables and data types (Programming)

- How to add and delete bookmarks in Ubuntu (Linux)

- Oracle in the add & split partition on the impact of global & local index (Database)

- How to create a remote (Linux)

- Linux security settings (Linux)

- Linux Getting Started tutorial: hard disk partition and to deal with traps (Linux)

- How to choose the first programming language based on the life you want (Programming)

- CentOS yum source configuration (Linux)

- Install Firefox 28 on Ubuntu, Linux Mint (Linux)

- mysqldump issue a note (Database)

 
         
  Permissions and attributes of files and directories under Linux
     
  Add Date : 2018-11-21      
         
         
         
  We know that Linux system is a multi-user multi-tasking operating system, that is, different users have different permissions to the same file, so let's see what permissions and attributes for Linux:

First, the property file: owner group other

1, the owner of the file: for example, at home, your bedroom is a file, this is your master bedroom, you are the owner of this bedroom, you can store some of your own private items in the bedroom, others have no right See!

2 Groups: at home if the family seen as a group, and each family is this group one, the family living room are open for everyone at home who has the right of every in the living room doing the things they want, the living room is a part of this group of files, and the members of the family belongs to the user group;

3, others, such as a friend's house of a member, is one other person in the house that did not belong to his place, he has no authority, so that other people!


Second, the file directory permissions: rwx

1, r file (read) permissions: if a user permissions on this file only r, then the user can only view the files can not be edited!

2, w (write) permission to file: If a user has only w permission can only edit this file, you do not see the contents of existing files

3, file x (execute) permissions: execute permissions for the file, the file depends on the file is not able to perform

4, the directory r (read) permissions: directories and files a little different, if the user is the only r directory permissions, the user can only see the directory exists, but can not be less likely to make some of the directory in this directory operating!

6, rx directory (read execute) permissions: Users with this permission can enter this directory, after entering only be viewed, not write operations

7, rwx directory (read write execute) permissions: With r directory permissions can be seen with x can enter the directory and read, with w permissions can write in this directory, such as modifying delete, etc. New operating!


Third, modify the file directory permissions, properties:

1, modify the files group: chgrp

Column 1: chgrp [-r] groupname dirname / filename (-r is recursive, provided that the groupname this group exists)

2, modify the owner of the file: chown

Column 1: chown [-r] ownName dirname / filename (prerequisite is to have ownName this account)

3, modify the file permissions, command chmod, but modify the permissions in two ways, namely, numbers and letters:

(1) They are owner / group / others Three Identities have their own read / write / execute permissions

(2), the file permissions for the characters: "- rwxrwxrwx" nine permissions are three groups of three! Among them, we can use numbers to represent each permission, scores table for each permission as follows:
  r: 4
  w: 2
  x: 1

(3), three permission Three Identities is to accumulate: such as a file permissions for [-rwxr-xr-x] then the corresponding data is: owner: 4 + 2 + 1 group: 4 + 1 other : 4 + 1

 (4) If you give a file to give [-rwxr-xr--] permission to do so can be expressed as: chmod 754 filename

(5), with 4 to this file as given the same privileges as the class symbol to achieve the following: chmod u = rwx, g = rx, o = rx filename

Interpretation (6), notation

(7), this figure comes from private kitchens affirmed Bird Brother

(8), we use the time that the above uses the + = and - a number that role, I take a look at the full:

chmod u + w filename indicates that this file has a permission to add the w

chmod u - w filename indicates the file owner lost this authority w

And wherein the group other user is the same

(9), a special character he represents all that is meant is that all include: user group other three properties!

Four, a file, a directory of authorized users to:

1, we see in the above are modified to delete the file owner, group, etc., let's grant permission to a different file of different users;

2, see the acl set file attributes: getfacl file name / directory name, you can see information about the acl file directory: getfacl test

3, both the owner and the group for the test file a SUSEr authorized users, only the file rx permissions: setfacl -m u: Suser: rx / test
     
         
         
         
  More:      
 
- Linux modify the network interface name (Linux)
- Python data types summary (Programming)
- Use MySQL optimization of security to prevent misuse of aliases (Database)
- Use custom backup plans for Debian backupninja (Linux)
- Linux, Firefox unloading and installation and upgrade (Linux)
- C ++ inline functions (Programming)
- Machine Learning: Classification of the curse of dimensionality (Programming)
- Oracle Client + PL SQL Developer enables remote access to the Oracle database (Database)
- Remote database using RMAN recovery test (RAC return to single-instance database) (Database)
- CentOS 6.5 install Maven and Nexus warehouse agent (Server)
- VirtualBox virtual machine to install Linux (Linux)
- Java Graphics2D Paint (Programming)
- Linux process or thread is bound to a CPU (Programming)
- Linux Getting Started tutorial: How to backup Linux systems (Linux)
- VirtualBox - Linux system virtual machine shared folders (Linux)
- Linux operating system Start Tutorial: Xmanager Remote Access Linux graphical interface (Linux)
- Linux system Perl Lite netstat (Linux)
- Go Languages Reviews (Programming)
- Oracle 11g logical standby achieve BI needs (Database)
- Android application simulates the phone keypad (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.