Answer the question
In order to leave comments, you need to log in
How to correctly set the rights on the web server for the convenience of work?
There is a server with a website (apache + nginx + php). All site files are owned by the www-data user and only he can edit them.
Those. I'm in a group, but I can only watch, but I would like to quietly edit, add everything to git and all that. How to organize it? Change editing permissions for a group? How normal/safe is that? How should it be properly organized?
Answer the question
In order to leave comments, you need to log in
Greetings.
It's right when it's safe, but safe != Convenient.
All files are 644, directories are 755 and in terms of "want / convenient" this is not for production, back and front service on a test server and then deploy to prod (there are a lot of deployment methods, you can’t list everything, there are enough articles on Habré).
No test server? Virtual help.
If www-data can edit files and it is also a member of the www-data group, then giving the group write permissions will not change anything for the service to work. But you can add yourself to the group and get everything you want
In general, it is correct that no one ever edits the project files on the server with their hands. You edit locally, commit, push, and on the server you tighten it either by hand or with a deploy script.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question