Global FTP user

I am setting up a Centos 6.8 VPS to run a website plus it's staging and dev versions. We have some SSH users (authentication is key-only), and I am trying to set up a user (call them foo) for FTP access to all the sites. foo does not have ssh access or a /home/foo directory (does this mean they are a virtual user?

All the site directories beneath /var/www/ have owner foo, group www. (the same person maintains them all, so I see no need to have multiple users)

I'm using vsftpd, but am getting an error 500 OOPS: cannot change directory:/home/foo

SELinux is disabled

vsftpd settings are:

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
chroot_local_user=NO # me experimenting!
listen=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

I've obviously missed a step or two - what are they?

EDIT I have now set up TLS, made it mandatory, and set the home directory for user foo to /var/www. Filezilla is logging in fine, but timing out while trying to retrieve a directory listing.

Status: Connection established, waiting for welcome message...
Status: Initializing TLS...
Status: Verifying certificate...
Status: TLS connection established.
Status: Logged in
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/var/www"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PASV
Response:   227 Entering Passive Mode (103,194,112,34,77,0).
Command:    LIST
Error:  Connection timed out after 20 seconds of inactivity
Error:  Failed to retrieve directory listing

I set log_ftp_protocol=YES, but xferlog is empty.

-2
задан 27 August 2016 в 15:38
1 ответ

Я явно пропустил один-два шага - что это такое?

Вы пропустили исследование , прежде чем спросить Bullet point 2 * step

  • Google - ваш друг, ищущий 500 OOPS: невозможно изменить каталог: / home (даже без добавления vsftpd), вероятно, даст ответ на вашу проблему.

  • Поиск по сайту может быть вашим друг тоже , есть 13 вопросов, содержащих ваше сообщение об ошибке.

Вы также пропустили шаг безопасности.

  • Плохо иметь одну учетную запись, на которую можно писать везде.
  • Использование FTP не подходит (пароли передаются в явном виде и т. Д. Используйте sftp или ftps)
  • Вы отключили SELinux, что плохо.

Вы, вероятно, пропустили этап чтения документов VSFTP тоже.

* Остальную часть этой ссылки тоже стоит прочитать.

0
ответ дан 5 December 2019 в 21:40

Теги

Похожие вопросы