我将下面添加到sshd_config,当我chmod 770用户文件夹我得到这个错误? 为什么? 我怎样才能让文件夹只能读取到用户或组? 所有者当前是root,并且该组当前是该用户名
fatal: bad ownership or modes for chroot directory
– 编辑 – 这是一个用户sftp来存储文件。 只有该用户或该组才能访问该文件夹。 我不明白为什么我不能将权限从755改为775。 当我尝试以用户身份login时,添加写入权限会给我一个错误。
sshd_config中:
Match group SomeGroup ChrootDirectory /mnt/somedir/%u X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp
从sshd_config(5)手册页:
ChrootDirectory Specifies a path to chroot(2) to after authentication. This path, and all its components, must be root-owned directories that are not writable by any other user or group.
您需要closures组写入位。