D
D
Dmitry2020-09-11 19:08:23
linux
Dmitry, 2020-09-11 19:08:23

linux. Debian. VMWare. fuse. Correct permissions on files and directories?

Good day!
Need help/advice from a Linux expert.

The situation is as follows:
1. There is a host (debian, several VMs inside VMWare, VMWare runs as username) on which the /mnt/storage/cloud directory exists, the owner of the username:username directory has rights to directory 700;
2. There is a guest machine (debian), in which the above directory is mounted in /mnt/hgfs/cloud, while the owner of the directory is username:username, the rights to the directory are 700;
3. A web server is running on the guest machine, on which a cloud is spinning among the sites - nextcloud. The nextcloud directory is /var/www/nextcloud, the owner of the nextcloud directory is www-cloud:www-data, the cloud runs under the php-fpm www-cloud pool;
4. Nextcloud adds all user files along the path /mnt/hgfs/cloud, while all the directories and files it creates have permissions 755 and 644 respectively, and the owner - username:username

Question: how so? How are the rights to files and directories and their owner set? It is necessary that the rights be set to 700 and 600.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2020-09-11
@res2001

Duc etozh not Windows, there is no inheritance rights. The process that creates the file itself sets the access rights.
Google umask.
Set the required mask for the user under which www-cloud is running.
And yet, in my opinion, for the scheme to work, it should be username UID == www-cloud UID

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question