Linux file permissions to view and modify

Permissions define

    linux file permissions into: r read permission (4), w write permission (2), x execute permission (1)

    linux rights objects are divided into: owner, group of users, other users

Permission to modify:

    chown user: group / usr / local / xxx: the directory or file / user / local / xxx group assigned to the owner of the user (user) (group) of

    chown -R user: group / usr / local / xxx: -R represents recursively, all files and folders under that directory are authorized to do the same operation

    chmod 777 / uss / local / xxx: the owner, the group and other users have read, write, and execute permissions (3 7 objects are the owner, the group users, other users)

    chmod 775 / usr / local / xxx: the owner and the group users have read, write, and execute permissions, other users have read and execute permissions

    chmod + x /etc/init.d/xxx: All users execute permission (along + w, + r)

    chmod -x /etc/init.d/xxx: remove execute permission for all users (the same also -w, -r)

Permission to view:

    Run ll

     The first column: drwxr-xr-x indicates that the user execute permission to read and write, composed of four parts: d, rwx, rx, rx. D represents a first portion of the folder, as well as the same: l represents connection, - represents a file. The second part owner rwx represented by the executive authority to read and write; the third of four parts rx represent the group and other users have read-execute permissions to other users, no write permissions.

     The third column: testuser represents a file owner

     The fourth column: testgroup indicates that the file owner's group

 

Guess you like

Origin www.cnblogs.com/zhi-leaf/p/11442878.html