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?


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:


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?


| 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... – user122772 Mar 22 '13 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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