I have an Amazon Linux instance running SSH acting as an SFTP server. Clients log in, and are chrooted into an NFS-mounted directory. Users can read, write, and delete files, but renaming files fails with a non-specific "protocol error".
Here is a copy of my
Port 22 Protocol 2 HostKey /etc/ssh/ssh_host_rsa_key UsePrivilegeSeparation yes KeyRegenerationInterval 3600 ServerKeyBits 1024 SyslogFacility AUTH LogLevel INFO LoginGraceTime 120 PermitRootLogin prohibit-password StrictModes yes RSAAuthentication yes PubkeyAuthentication yes IgnoreRhosts yes RhostsRSAAuthentication no HostbasedAuthentication no PermitEmptyPasswords no ChallengeResponseAuthentication no PasswordAuthentication yes X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no AcceptEnv LANG LC_* # Subsystem sftp /usr/lib/openssh/sftp-server -u 0002 Subsystem sftp internal-sftp -l DEBUG -u 002 -d %u UsePAM yes Match Group sftpusers ChrootDirectory /autohome AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp -l DEBUG -u 002 -d %u
I've seen reference to sftp rename not working when the source and destination are on separate filesystems, but that's not the case here. I've also seen reference to sftp rename not working on filesystems that do not support hard links, but I think our NFS server (AWS File Storage Gateway) should be fine. I'm at a loss, any help is appreciated.