Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm administrating a Synology Diskstation 412 with DSM 4.1 and I need to be able to upload files to the filesystem via SFTP. However, when I enable the built-in SFTP server in the DSM, it always jails me to my home directory. I've tried to change the configuration in /etc/ssh, but it makes no difference. Logging in to the server via SSH lets me access the file system normally, however.

Is there a way to undo the jail on SFTP?

share|improve this question

1 Answer 1

It depends on the daemon your system is using to provide the SFTP. We have this chroot set here with the vsftpd, and it is the following parameter:

chroot_local_user=YES

This will force the users to be chrooted to their home dir, but it's a vsftpd server SPECIFIC configuration. Do you know that is the daemon that Synology uses to provide this service?

Edit: If the sftp service is provided by OpenSSH, you could take a look at the "sshd_config" file, and look for the ChrootDirectory parameter? Is it unset?

http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config&sektion=5

share|improve this answer
    
The DS seems to be using an sshd located at /usr/syno/sbin/ssh to handle SSH. I've already had a look at the sshd_config, ChrootDirectory was set to "none". However, I don't think it's using that file, since the port configured there does not correspond with the port set in the GUI manager. Most, if not all options in the file are also commented. –  Bevin Mar 22 '13 at 13:36
    
Maybe the SSH is being chrooted during the launch, of a sftp specific proccess is being chrooted at the start, like it is with the apache inside OpenBSD, that is chrooted by default. Let me read some docs... –  nwildner Mar 22 '13 at 14:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.