We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
Запрет записи в файлы
Запрет записи в файлы
Всем привет!
Вот уже длительное время бьюсь над одним вопросом.
Проблема заключается в том, что php из-под apache и mod_ruid2 запускается под user:user. Это замечательно, но процесс имеет доступ на запись во все файлы и директории этого юзера. Соответственно, всякие там дырявые WordPress, Joomla и иже с ними просто не выживают.
Вариантов вижу два, но оба крайне неудобные:
1. chmod 444 для файлов и 555 для директорий, но тогда юзер не сможет толком работать со своими файлами по ftp.
2. chattr +i - круто и надежно, точно не взломают :)
Господа, как вы выходите из положения? Может, я чего-то не вижу?
P.S. Классная и удобная панель, давно ей пользуюсь, спасибо!
Вот уже длительное время бьюсь над одним вопросом.
Проблема заключается в том, что php из-под apache и mod_ruid2 запускается под user:user. Это замечательно, но процесс имеет доступ на запись во все файлы и директории этого юзера. Соответственно, всякие там дырявые WordPress, Joomla и иже с ними просто не выживают.
Вариантов вижу два, но оба крайне неудобные:
1. chmod 444 для файлов и 555 для директорий, но тогда юзер не сможет толком работать со своими файлами по ftp.
2. chattr +i - круто и надежно, точно не взломают :)
Господа, как вы выходите из положения? Может, я чего-то не вижу?
P.S. Классная и удобная панель, давно ей пользуюсь, спасибо!
-
- Posts: 129
- Joined: Tue Mar 08, 2016 8:03 pm
- Os: CentOS 6x
- Web: nginx + php-fpm
Re: Запрет записи в файлы
1 пользователь, 1 сайт. Т.к. в данном случае смена прав доступа, в сущности, до лампочки. Если злоумышленник запустил шелл от имени пользователя - изменить права доступа на всё что угодно в рамках его учетки - не проблема.Господа, как вы выходите из положения? Может, я чего-то не вижу?
Ну и без тотального обновления всего и вся размещать это на сервере - злое зло за которое нужно рубить руки попарно. (контраргумент, мол, "у меня Джумла 1.5 потому что хххх не работает в актуальной версии" как правило проистекает из клинической тупости разработчика сайта, либо из непонимания/жадности владельца)
Re: Запрет записи в файлы
Согласен, но не все хаки делаются ручками, а отсутствие доступа на запись куда попало существенно уменьшило бы и вероятность взлома, и ущерб для самого сайта.Nanotraktor wrote:1 пользователь, 1 сайт. Т.к. в данном случае смена прав доступа, в сущности, до лампочки. Если злоумышленник запустил шелл от имени пользователя - изменить права доступа на всё что угодно в рамках его учетки - не проблема.
А что до обновления, вы совершенно правы. Да только не у всех владельцев/админчегов сайтиков разных доходят до этого руки, а потом, мол, взломали. И с этим ничего не сделать. Вот и ищу пути улучшения ситуации.