In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "Linux rights management of directory access restrictions example analysis", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and study the "Linux rights management directory access restrictions example analysis" of this article.
Recently, the project has a requirement for the Linux file directory: the business user and its startup process can drwx the specified directory, in which a user can rwx a subdirectory in the business user's directory
However, no read or write operations can be performed on other directories above this subdirectory. In fact, the implementation is very simple, assuming that root is a business user, test is a restricted user, / test/t1 is the business directory of root, / test/t1/t2
Is a restricted directory that test users can access and operate, so you only need to give / test a 701, give T1 a 701, give / test/t1/t2 a 700and change the subordinate group and host of T2 to test:test
Ensure that root can operate absolutely on any file and directory under / test, and restrict test users to / test/t1/t2. Test users cannot read or write to / test or / test/t1.
Examples are as follows:
[root@oratest /] # ls-l
Total 192
...
Drwx-x 3 root root 4096 Apr 26 17:21 test
...
[root@oratest /] #
[root@oratest test] # ls-l
Total 4
Drwx-x 3 root root 4096 Apr 26 17:21 t1
[root@oratest test] #
[root@oratest T1] # ls-l
Total 4
-rw-r--r-- 1 root root 0 Apr 26 17:21 t
Drwx- 2 test test 4096 Apr 27 09:30 t2
[root@oratest t1] #
[test@oratest ~] $cd / test
[test@oratest test] $ls
Ls:.: Permission denied
[test@oratest test] $cd T1
[test@oratest T1] $ls
Ls:.: Permission denied
[test@oratest T1] $cd T2
[test@oratest T2] $ls
1 b
[test@oratest T2] $touch a
[test@oratest T2] $ls
1 a b
[test@oratest T2] $
The above is all the contents of this article entitled "sample Analysis of Directory permission restrictions in Linux Rights Management". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.