Answer the question
In order to leave comments, you need to log in
How to create folders and files with pre-set owner and group?
There is a domain folder /var/www/mysite.ru with permissions 775 . As an owner ( user1
) a user who connects via SFTP and accordingly can change the contents of files, create folders \ files, delete them, etc. And as a group - web
- this group includes users of the necessary services - a web server, PHP-FPM, etc.
[[email protected] www] ls -l mysite.ru
drwxrwxr-x 4 user1 web 4096 апр 6 13:00 public
[[email protected] www]$ touch mysite.ru/myfile && ls -l mysite.ru
итого 4
-rwxrwxr-x 1 user1 user1 0 апр 6 13:54 myfile
drwxrwxr-x 4 user1 web 4096 апр 6 13:00 public
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question