I
I
Ivan Komarov2018-06-10 19:27:12
Nginx
Ivan Komarov, 2018-06-10 19:27:12

How to set permissions for FTP user to update Wordpress correctly?

Good afternoon.
I can't figure out how to properly set permissions.
There is Debian+Nginx+Wordpress+Vsftpd
Everything works as it should except wordpress update and plugin update.
In the first case, the error: "cannot unpack the file", in the second, the plugins are updated, however, after the update, the .maintance file is not automatically erased
when executing sudo chown -R www-data:www-data /var/www/web-site-folder
everything works fine, but the ability to save files under the ftp user naturally falls off.
Tried adding the user to the www-data group and setting the www-data group as the primary group.
At the same time, everything happens normally in the ftp server log and not a single error. Files are downloaded, directories are created, and then the whole thing is deleted without errors.
And in the admin panel all the same:
Extracting the update ...
Checking the unpacked files ...
The update could not be unpacked
The installation failed
What can you advise? Thank you.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Danila Master, 2018-06-10
@dgmasster

And if it's just access to the WP admin panel? And update from there?

K
ky0, 2018-06-10
@ky0

Tried adding the user to the www-data group and setting the www-data group as the primary group.

So you also give the right to the group, as the owner - and everything will take off.
Z.Y. - I would probably do the opposite for simplicity - ftp:www-datalike this.

P
pfg21, 2018-06-10
@pfg21

run ftp-server on behalf of the user and group under which the www-server is running??
of course a certain security hole, but depends on the purpose of using ftp

A
Alexander Karabanov, 2018-06-10
@karabanov

Something like this How to set permissions for linux user and www-data?

R
RedBuld, 2018-12-05
@RedBuld

usermod -o -u 33 USER_NAME
Do not use without open base dir

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question