W
W
wamuu2021-10-21 09:21:49
FTP
wamuu, 2021-10-21 09:21:49

How to grant permissions to a user on an Ubuntu FTP directory?

We created a user and added a directory to him, connected via an FTP client, tried to upload files, gave an error 550. How to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-10-21
@karabanov

Use proftpd
Use ftpasswd to create a user with the correct permissions. The system user ID can also be specified there.
Something like this:

ftpasswd --passwd --file=/etc/proftpd/proftpd.passwd --name=ftp_user --uid=$(id -u system_user) --home=/var/www/iva/data/www/iva.su/drafts --shell=/bin/false

ftp_user - FTP user name.
system_user - file owner username.
Add to proftpd config?
AuthUserFile /etc/proftpd/proftpd.passwd
AuthOrder mod_auth_file.c
RequireValidShell off
DefaultRoot ~

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question