SFTP configuration Multi-user rights work needs, users upload files to the directory, with FTP is not too safe, choose SFTP. Let the user in their own home directory activities, can not SSH to the machine to operate. Start working under . To view SSH version ssh-v, my system is CentOS6.4 SSH version is 5.3 (greater than 4.8) no problem. 0, create user directory root permissions create user and genus Group are root mkdir -p/opt/sftp/dir1/{upload,public} 1, create Groupadd Sftp 2. Create User-s/sbin/nologin -g sftp davis user-s/sbin/nologin-g sftp davis1 3, creating da Vis password passwd Davis or Echo davis:123456|chpasswd passwd davis1 4, modify Sshd_config file & nbsp #Subsystem sftp /usr/libexec/openssh/sftp-server (commented out) Add the following line Subsystem SFTP internal-sftpmatch Group sftp chrootdirectory/opt/sftp/dir1 &N Bsp Forcecommand internal-sftp x11forwarding no &nbs P allowtcpforwarding No restart sshd/etc/init.d/sshd restart 5, give directory subordinate permissions chown Davis:sftp/opt/sftp/dir1/upload chown davis1:sftp/opt/sftp/dir1/public chmod /opt/sftp /dir1/upload chmod 700/opt/sftp/dir1/public 6, will upload to Davis users
SFTP Configuring multi-user Permissions