W
W
WayMax2018-09-07 11:43:47
linux
WayMax, 2018-09-07 11:43:47

How to properly set permissions for a site in Linux?

What is the best way to restrict access to the file system? A site that has scripts (Apache must read them), configs (Apache must read and write them), database files (subd must read and write them) and at the same time the OS user must have rights so that he can replace both script files and config .
How correct is the next option (if not correct, then which option would be correct?

/home/ (стандартные права)
    mysite/ (владелец "администратор_пк", права 700)
        db/ (владелец "администратор_субд", группа "пользователи_субд", права 770)
        conf/ (владелец "апач", группа "апач", права 770)
        site/ (владелец "апач", группа "апач", права 470)

пользователь "администратор_пк" входит в группы: "пользователи_субд", "апач"

Will the subd and apache have access to the files they need in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Radjah, 2018-09-07
@Radjah

What for to you a DB in the directory of the user? The database server must steer the rights to the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question