sftp
Once configured the cage in the file sshd_config
Subsystem sftp internal-sftp
Match Group sftponly
ChrootDirectory %h
AllowTcpForwarding no
ForceCommand internal-sftp
and
home/user root:root rwx r-x r-x
home/user root:root rwx r-x r-x
home/user/input user:sftponly rwx r-x r-x
passwd
user:x:502:501:user:/home/onosftp:/sbin/nologin
group
sftponly:x:501:user
sftp user@xxx.xxx.xxx
sftp>ls
Couldn't get handle: Permission denied
sftp>
Help
Responses
We have here this ls
#
ls -la /home/USER/
total 36
drwxr-xr-x 5 root USER 4096 Jul 8 10:30 .
drwxr-xr-x 18 root root 4096 Jun 26 2014 ..
...
drwx------ 2 USER USER 4096 Jul 10 13:50 .ssh
drwxr-xr-x 3 USER USER 4096 Jul 10 21:58 upload
#
You see the . group is USER.
Cheers
Hi Juan,
(I am neither English, nor Spanish. Still hope to be able to enlighten you)
My English text, below you can find a Google translation in Spanish
Aleksander asks whether you understand what he wrote.
You have to check the user name and group name owning the subdirectory.
He suggest to make them the user name and group name "user" like you mentioned in this discussion.
So not root:sftponly.
=========================================================================
Google translation in Spanish: Hope this helps a little
Aleksander pregunta si usted entiende lo que él escribió.
Usted tiene que comprobar el nombre de usuario y el nombre del grupo propietario del subdirectorio.
Se sugiere para hacerlos el nombre de usuario y nombre de grupo "usuario", como usted ha mencionado en este debate.
Kind regards,
Jan Gerrit Kootstra
Hm ok.
please can you try the following.
shell1: $(which sshd) -ddd -p 4711
shell2: sftp -P 4711 -vvv onosftp@172.19.21.15
and post the output of both shells.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
