Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Explain in detail how Linux authorizes all the contents of a folder to a user?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

[problem Analysis]

We can use the chown command, ch here represents the meaning of change, own stands for the English word owner (owner), connected together is change owner, change the owner of a file or folder.

Generally, only root users have permission to use this command, and it is also a command that is often used. Here comes the problem! If I want to authorize a folder and all its child contents to mysql users, what should I do

What about the operation?

[solution]

We can add the-R parameter to achieve this.

-R: make the same owner changes for all files in the current directory as well as subdirectories (that is, change them one by one by recursion)

For example: I want to authorize landui.com to mysql users

This is the directory structure of landui.com

We authorize the entire folder to mysql users

Let's take a look at the current permissions.

We can see that all the authorizations are successful, indicating that this parameter is available.

The above is the editor to introduce to you how Linux authorizes all the contents of a folder to a certain user to explain and integrate in detail. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report