sftp login problems

and i am creating ftp server give below

yum install -y vsftpd

yum install -y ftp

mkdir /home/data

mkdir /home/data/user 1 user2 user3 user4 user5

useradd user1

useradd user2

useradd user3

useradd user4

useradd user5

usermod -d /home/data/user1 user1

usermod -d /home/data/user2 user2

usermod -d /home/data/user3 user3

usermod -d /home/data/user4 user4

usermod -d /home/data user5

vi /etc/vsftpd/vsftpd.conf

edit nonymous_enable=no chroot_local_user=YES chroot_list_enable=YES chroot_list_file=/etc/vsftpd/chroot_list

cd /home/vsftpd

touch chroot_list

setsebool -P allow_ftpd_full_access 1

when i am using ftp site outside network using filezilla its working fine using port number 21. user1,user2,user3,user4 only access the home directory only. user1 can’t go another users directory. user5 access only four users home directory. when user1 access ftp site using sftp and port number 22 using user1 access remaining users accounts also. so how i can restrict user 1.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

what is the code to set user1’s password to " 12345"

Digital ocean does not use ftp connections, as they are very inseguraas, what you can do is connect from ftp client on port 22. <br> <br>Host: 107170192195 <br>user: root <br>port: 22 <br> <br>You’ll get a warning message about the connection, give everything and if ready.

While they have similar names, SFTP and FTP are actually very different things, and they have completely separate configurations. To restrict a SFTP user, you need to edit the file <code>/etc/ssh/sshd_config</code> and add a section including: <br> <br><pre> <br>Match User user1 <br> ChrootDirectory /home/user1 <br> ForceCommand internal-sftp <br></pre>