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
Table of contents A. Docker deployment of springb...
First of all, the blogger is playing the communit...
question Recently I encountered a requirement to ...
I've been learning Docker recently, and I oft...
1. Edit the PAM configuration file sudo vim /etc/...
Here we introduce the centos server with docker i...
To put it simply, MySQL worm replication is to co...
This article example shares the specific code of ...
What is MyCAT A completely open source large data...
summary In some scenarios, there may be such a re...
I'm using a placeholder in a text input and i...
Error: Connection to blog0@localhost failed. [080...
1. After entering the container cat /etc/hosts It...
Linux version upgrade: 1. First, confirm that the...
When we write some UI components, if we don't...