N
N
Nazar Mokrinsky2012-09-12 17:17:19
linux
Nazar Mokrinsky, 2012-09-12 17:17:19

Owner of files and folders via ssh (sftp) as in parent directory

Is it possible to make files and folders created and modified via ssh (sftp) have the same owner as the parent directory, and not the current user?
There is umask, but manages the rights, and I need the owner.
The reason for this is that several sites are running under different users, that is, the sites are isolated from each other, the rights cost 700, and after editing the files (by a user who has access to all sites), the owner goes astray and 700 chmod does not allow the web server to access the file .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vadim Misbakh-Soloviev, 2012-09-12
@nazarpc

well, so you decide: either “what kind of isolation” - and then a copy is launched for each user, for example, php-fpm under his uid / gid in a separate pool, or chmod 750 (770 places, where you need to write from the web server) +chownuser:web.
It's just that your approach is, in fact, far from both isolation and convenience.
By the way, by setting the group suid bit on a directory, all directories and directories created inside it will have the same gid ;)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question