【Problem Analysis】 We can use the chown command. ch here stands for change, and own stands for the English word owner. Together, they mean change owner, which changes the owner of a file or folder. Generally, only the root user has permission to use this command, and it is also a frequently used command. Here comes the question! If I want to grant permission to a folder and all its sub-contents to the mysql user, how can I do this? What about the operation? 【Solution】 We can add the -R parameter to achieve this -R: Make the same owner change to all files and subdirectories in the current directory (i.e. change them one by one in a recursive manner) For example: I want to authorize landui.com to the mysql user This is the directory structure of landui.com We authorize the entire folder to the mysql user Let’s take a look at the current permissions. We can see that all authorizations are successful, indicating that this parameter is available. The above is a detailed introduction of how to authorize all the contents of a folder in Linux to a certain user. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: How does JS understand data URLs?
>>: Analysis of MySQL concurrency issues and solutions
This article introduces how to install the system...
Referring to the online information, I used cmake...
<br />How to remove the dividing lines of a ...
Query the total size of all databases Here’s how:...
Do you add an alt attribute to the img image tag? ...
Table of contents Overview Is the extension neces...
1. MySQL self-connection MySQL sometimes needs to...
Table of contents Constructing payment methods us...
Learning to use CSS3's 3D effects to create a...
1. Introduction This article does not have screen...
This article shares two methods of implementing t...
In actual projects, the up and down scroll bars a...
User namespace is a new namespace added in Linux ...
Gtid + Mha + Binlog server configuration: 1: Test...
Table of contents Overview 1. Menu and routing pr...