1 Create a user and specify the user's root path and password useradd -d /home/mydir -m username Users created in this way can log in using ssh, but have only read-only permissions to browse and download some files but cannot write or modify them. It is recommended to obtain permissions for the specified path by adding the user to a group. 2 Set a password 3 User Authorization chown -R username: username /home/ mydir chmod 755 /home/mydir 4 Add users to the group Add a user to a user group. Try not to use it directly (unless it really belongs to only one group): Doing this will remove you from the other groups and make you a member of groupA only. Should be used with -a option: To view the groups to which a user belongs, use the command Summarize The above is what I introduced to you about creating a new user in Linux and granting relevant permissions to the specified directory. 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:
|
<<: Complete steps to install MySQL 8.0.x on Linux
>>: DOM operation implementation in react
Normally, when a deadlock occurs, the connection ...
Table of contents 1 Question 2 Methods 3 Experime...
1. What problems did we encounter? In standard SQ...
Why should we use CSS animation to replace JS ani...
I had been working on the project before the New ...
Table of contents 1. Customize the network to rea...
This article example shares the specific code for...
When we use Vue for development, we may encounter...
MySql Null field judgment and IFNULL failure proc...
introduction The previous article introduced the ...
This article example shares the specific code of ...
——Notes from "MySQL in Simple Terms (Second ...
<br />Original: http://uicom.net/blog/?p=762...
Table of contents Preface Create a Vite project R...
Preface: The previous articles introduced the usa...