M
M
monyavitevna2018-02-28 12:16:31
linux
monyavitevna, 2018-02-28 12:16:31

Need to create a user with FTP/SFTP access only?

There is a folder /home/bitrix/www/images_canonical/
There is a user tltltl with a home directory /home/bitrix/www/images_canonical/ It is
necessary to make access only to this folder. Those. prevent the user from going to the directory above, etc.
How to do?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Saboteur, 2018-02-28
@saboteur_kiev

Create a group sftpusers
add the necessary users to this group
change the shell for these users to nologin
Configure sshd for this group:
/etc/ssh/sshd_config

Match Group sftpusers
        ChrootDirectory /sftp/%u
        ForceCommand internal-sftp

ready. (don't forget to reboot sshd)

D
Dmitry, 2018-02-28
@Tabletko

man chroot

A
AVKor, 2018-02-28
@AVKor

Like this:

Match User ftpuser
        ForceCommand internal-sftp
        ChrootDirectory /sftp

in sshd_config

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question