Ok I am a little confused about those permissions on Linux, so please, people help me. The problem is that I do not want to start the server as root, so I created another user with sudo privileges, so it starts the nginx and php-fpm servers (example "sudo_user"). But the problem is that I have "some_user" and it has a directory of its website "some_user / www.some_user.com" with all the configuration files, including database passwords, etc. I set the ownership of all files to some_user: some_user (user: group) and changed the permissions for all files 751 (u = rwx, g = rx, o = x so that other accounts could not just enter this directory and read each configuration file) and set to allow 755 open files. But my php-fpm works with "sudo_user" with the group "sudo_user ", it does not have permission to write or read configuration files in the" some_user "directory. What strategy should I take?
Filip source
share