sftp:configuring_the_user_home_directory
Differences
This shows you the differences between two versions of the page.
sftp:configuring_the_user_home_directory [2016/12/05 11:31] – created peter | sftp:configuring_the_user_home_directory [2019/12/04 20:45] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== SFTP - Configuring the User Home Directory ====== | ||
- | |||
- | In the root of the users home directory, creating symlinks to different parts of the server outside of the users home directory won't work as symlinks are relative to the root directory, which in this case is the user's chrooted home directory. | ||
- | |||
- | You first need to create a directory and them mount a directory somewhere else on the server to that directory. | ||
- | |||
- | <code bash> | ||
- | sudo mkdir / | ||
- | |||
- | sudo mount --bind /var/www / | ||
- | </ | ||
- | |||
- | This won't work if the / | ||
- | |||
- | Made a mistake? | ||
- | |||
- | <code bash> | ||
- | sudo umount / | ||
- | </ | ||
- | |||
- | Since typical users don't have the required root access to execute these commands, and they would be lost as soon as you reboot the server. | ||
- | |||
- | <code bash> | ||
- | sudo vi /etc/fstab | ||
- | </ | ||
- | |||
- | Add the following line to the end of the file and save: | ||
- | |||
- | < | ||
- | /var/www / | ||
- | </ | ||
- | |||
- | The next time you reboot your server, the directories will automatically be mounted. | ||
sftp/configuring_the_user_home_directory.1480937471.txt.gz · Last modified: 2020/07/15 09:30 (external edit)