With proftpd you can change the default directory editing /etc/proftpd.conf
DefaultRoot ~
change to
DefaultRoot ~/music
How i can achieve the same result with SFTP?
Im using ubuntu lucid btw.
Ty so much for your help.
|
With proftpd you can change the default directory editing /etc/proftpd.conf How i can achieve the same result with SFTP? Im using ubuntu lucid btw. Ty so much for your help. |
|||
|
|
Have a look at this article which shows how to use sshd's |
|||||
|
|
|
Perhaps there is a way to achieve what you want but as far as I know, sftp is operated over ssh so not so sure how to do that with ssh for every user. However, one way to get around what you want to do is that you can update the user data to log in to certain directory as follows. This will w
|
|||
|
|
|
I just went through the same sort of thing with an Ubuntu Lucid 10.04 install. The answer seems to be to chroot certain logins to a specific folder. The only disadvantage being that the folder that they are chrooted to must be owned by root:root and can't be writable by the user logging in in order for ssh to allow the sftp login to work. SO, they only have access to other folders within the folder that they are chrooted to. http://ubuntuforums.org/showthread.php?t=1057657 Also, setting the default folder for the user using "usermod -d doesn't change the default for that user going to the root / folder upon sftp login. |
|||
|
|
|
If you're using ProFTPD, then take a look at the ProFTPD SFTP module. |
|||
|
|
|
lain's answer was helpful, but in the interest of being more explicit, and not depending on a link(and so I can find it next time): Search the web for For a dedicated file server use: Set Make sure the users directory in /home is owned by root:root Set the home-directory path in /etc/passwd to the directory you want to be logged into by default - but make it relative to the chroot directory: If you want the user acnt to end up in /home/acnt/files/, then set the passwd home for acnt to /files Make sure that /home/acnt/files is owned by acnt:acnt, so that the user can write to the directory, even though /home/acnt/ must be owned by root for the chroot jail to function. |
|||
|
|