S
S
Shimpanze2019-11-25 07:19:56
linux
Shimpanze, 2019-11-25 07:19:56

What to set the rights to the folder?

Hello!
On the Ubuntu 18 + Nginx server, there is a folder with a site /var/www/site.rufor which the owner is set like this:
$ sudo chown -R www-data: /var/www/site.ru
And the FTP client “vsftpd” is also installed, with a user folder /home/customuser/ftp/datafor which the owner is set like this: Accordingly, so that you can interact with site files via FTP (change, delete etc.), the sites folder is mounted to the FTP user folder. Like this:
$ sudo chown $USER:$USER /home/customuser/ftp/data

$ sudo mount --bind /var/www /home/customuser/ftp/data

The site admin panel works fine (uploads and deletes files without problems), but when connecting via FTP and trying to upload something to a folder, an error occurs (does not allow uploading or deleting files).
How to properly set folder owners under such a system?
PS Rights everywhere 755 and 644.
Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
keystore, 2019-11-25
@keystore

Most likely vsftpd and the webserver are running under different users.
You can add these different users to the same group

Z
zevilz, 2019-12-05
@zevilz

For me, it's easier to get a user under the site. Throw the site itself into the user's hamster and connect via sFTP using the user's login and password.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question