Linux за българи: Форуми

Linux секция за начинаещи => Настройка на програми => Темата е започната от: BlooDevil в Oct 23, 2015, 17:46



Титла: Настройка на Debian vsftpd
Публикувано от: BlooDevil в Oct 23, 2015, 17:46
Здравейте, имам проблем с настройката на vsftpd, пробвах се да направя chroot за ограничаване на достъпа на потребителите до точно конкретна директория, а именно /var/www, но все не става отваря се директорията може да се пише и чете в нея, но потребителя може да вижда и да смъква файлове от системата /
Има ли някакъв по лесен и сполучлив начин да огранича потребителите от една група да отварят и да виждат само тази директория ?


Титла: Re: Настройка на Debian vsftpd
Публикувано от: 10101 в Oct 23, 2015, 21:11
http://vsftpd.beasts.org/vsftpd_conf.html

user_config_dir
    This powerful option allows the override of any config option specified in the manual page, on a per-user basis. Usage is simple, and is best illustrated with an example. If you set user_config_dir to be /etc/vsftpd_user_conf and then log on as the user "chris", then vsftpd will apply the settings in the file /etc/vsftpd_user_conf/chris for the duration of the session. The format of this file is as detailed in this manual page! PLEASE NOTE that not all settings are effective on a per-user basis. For example, many settings only prior to the user's session being started. Examples of settings which will not affect any behviour on a per-user basis include listen_address, banner_file, max_per_ip, max_clients, xferlog_file, etc.

    Default: (none)


root@debian:~# cat /etc/vsftpd_user_conf/lili
write_enable=YES
chroot_local_user=YES
local_root=/var/www/ftp/$USER
user_sub_token=$USER
root@debian:~#


Титла: Re: Настройка на Debian vsftpd
Публикувано от: korea60 в Oct 25, 2015, 10:36
Може да промениш правата на папките т.е. www е примерно 755, а var e собственост на root или друг потребител.
Потребителя, който ще се логва във фтп-то, не би трябвало да има шел .т.е. /sbin/nologin ии подобен.