пятница, 28 ноября 2014 г.

500 OOPS: vsftpd: refusing to run with writable root inside chroot()

Тестируя апгрейд одного из серверов со Squeeze до Wheezy я столкнулся с невозможностью зайти на сервер по FTP. В качестве FTP сервера используется vsftpd с поддержкой виртуальных пользователей.

При попытке зайти через lftp выдается невнятная ошибка TLS

$ lftp admin@example.com
lftp admin@example.com:~> dir
ls: Фатальная ошибка: gnutls_record_recv: An unexpected TLS packet was received.

Выключаю поддержку SSL и пробую снова

ls: Ошибка регистрации: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()

После чтения /usr/share/doc/vsftpd/FAQ.gz стало ясно, что это сделано специально
Q) Help! I'm getting the error message "refusing to run with writable root".
A) vsftpd is protecting against dangerous configurations. The cause of this
message is usually dodgy ownership of the ftp home directory. The home
directory should NOT be owned by the ftp user itself. Neither should it
be writable by the ftp user. A way to fix this is:
chown root ~ftp; chmod -w ~ftp
Another cause might be an attempt to use chroot_local_user without setting up
the directory ownership properly.
Попробовал добавить опцию "allow_writeable_chroot=YES", но версия vsftpd в Wheezy ее не знает.

В качестве решения пересобрал пакет из Sid и выложил в репозитарий.

Комментариев нет:

Отправить комментарий