Worth Nginx + Apache + Php-Fpm on debian 8. Recently I reinstalled some server packages including apache. As a result, flew the rights to the site files. Scripts cannot be recorded (only from 777), and old files (eg pictures) cannot be overwritten. As I found out, the problem was not in the rights, but in the group. Before that it was and everything was written well.
drwxrwxr-x 5 userst userst 4427776 июл 3 16:10 upload I tried to change the userst group to www-data ( chown userst:www-data upload ), and the scripts started writing as before. vipw gives the vipw data:
... www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin ... userst:x:501:501:db_userst:/var/www/userst/data:/bin/bash ... Is it possible to somehow give userst same rights as www-data ?
I tried to add userst to the www-data group.
I checked /etc/group like there is a www-data:x:33:userst , but the scripts cannot write failed to open stream: Permission denied .