In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. File permissions 1. File attribute
two。 The permissions of files are mainly defined for three types of objects.
Owner: owner, u
Group: belonging to group, g
Other: other, o
3. Each file defines three permissions for each type of visitor.
R: Readable, read
W: Writable, write
X: eXcutable, execute
(1) for documents
R: you can use the file view class tool to get its contents
W: its content can be modified
X: you can ask the kernel to start this file as a process
(2) for catalogs
R: you can use ls to view a list of files in this directory
W: files can be created or deleted in this directory
X: you can use ls-l to view the file metadata in this directory (with r), and you can enter this directory by cd
X: only give directory x permission, not file x permission
4. File permission list
5. Modify file permissions command
(1) chmod [OPTION]... MODE [, MODE]... FILE...
MODE:
Modify all permissions for a class of users:
U = g = o = ug= a = upright department g =
Example:
Modify certain bit or bit permissions for a class of users
U + u-g + g-o + o-a + a-+-
Example:
(2) chmod [OPTION]... -- reference=RFILE FILE...
Refer to the permissions of the RFILE file, and modify FILE to be the same as RFILE
Example:
(3) chmod [OPTION]... OCTAL-MODE FILE...
Parameters and examples:
-R: recursively modify permissions
(4) modify permissions according to the numerical representation in the file permission list
Example:
Second, document owners and subordinate groups 1. The owner of the modified file: chown
(1) chown [OPTION]... [OWNER] [: [GROUP]] FILE...
Usage:
OWNER
OWNER:GROUP
: GROUP
Note: the colon in the command is available. Replace
-R: recursive
(2) chown [OPTION]... -- reference=RFILE FILE...
two。 Modify the group of the file: chgrp
Previously, you have demonstrated changing the owner while changing the group through the chown command. The following shows the command to change the group separately.
(1) chgrp [OPTION]... GROUP FILE...
(2) chgrp [OPTION]... -- reference=RFILE FILE...
(3)-R recursion
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.