Sometimes we want to host a website without a cpanel. This tutorial will explain the entire procedure of creating an FTP user using the linux command linees in SSH terminal.
1. Login as root through SSH.
2. Use below command to add an FTP user:
3. Now create a group for the user we created above or we can use an existing one too:
4. Now to add the user to the group using below commands:
5. Change the group ownership of the special directory to that group:
6. Enable write permissions to the folder:
7) Assign a password to the user we created:
These commands will work in almost all popular linux distros.
Note: In step 5 and 6 please be sure to locate the correct directory location as it may be different depending on the type of OS you using.
1. Login as root through SSH.
2. Use below command to add an FTP user:
Code:
useradd myname
3. Now create a group for the user we created above or we can use an existing one too:
Code:
groupadd mygroup
4. Now to add the user to the group using below commands:
Code:
gpasswd -a myname mygroup
5. Change the group ownership of the special directory to that group:
Code:
chgrp -R mygroup /home/myname
6. Enable write permissions to the folder:
Code:
chmod -R g+rw /home/myname
7) Assign a password to the user we created:
Code:
passwd myname
These commands will work in almost all popular linux distros.
Note: In step 5 and 6 please be sure to locate the correct directory location as it may be different depending on the type of OS you using.
0 comments:
Post a Comment