Linux User & File Management
From 2047Servers Support
| Line 80: | Line 80: | ||
Jailing users in a folder is a very common technique for server sharing like web hosting, you can give users access to only their folder & they cannot get out of their folder. (Please read some of the points above if you wish to do this) | Jailing users in a folder is a very common technique for server sharing like web hosting, you can give users access to only their folder & they cannot get out of their folder. (Please read some of the points above if you wish to do this) | ||
| − | You will have to edit your "proftpd.conf" file ( | + | You will have to edit your "proftpd.conf" file (or the vsftpd.conf file if you are using vsftpd instead) within that file you will see an option for default login root folder (If it is hashed out "#" unhash it & set it as "DefaultRoot ~" |
Now if you have already created your user great, if not see the steps above on creating a user (useradd username), Once you have created a user edit the "/etc/passwd" file & edit the home directory to the folder location you want e.g. /home/newuser (Make sure that user has permission on that folder, otherwise they wont be able to login (because they dont have access to that folder) | Now if you have already created your user great, if not see the steps above on creating a user (useradd username), Once you have created a user edit the "/etc/passwd" file & edit the home directory to the folder location you want e.g. /home/newuser (Make sure that user has permission on that folder, otherwise they wont be able to login (because they dont have access to that folder) | ||