I'm trying to create a SFTP server using Ubuntu Server 24.04 LTS, and I'm having trouble copying to the folder I created:
- The
sshd_config
setsChRootDirectory
to\sftpsrv
, which is a mounted disk specifically for SFTP files - I am not able to create a folder inside
\sftpsrv
or assign permissions to a user and send files to that folder; my goal is to have something like:\sftpsrv\linux \sftpsrv\windows \sftpsrv\firewall
- I want only one user, so to copy files to these folders I could use something like this, but after trying the first part, as soon as I try to copy the file, I get
permission denied
:copy sftp://{user}:{password}@{IP}/linux/{filename}
Can anyone help me solve this?
Root is the owner of /sftpsrv and sftpuser is the owner of the others folders.
sudo namei -l /sftpsrv
?