Hello,
I'm trying to synchronize my gallery folder with my raspberry pi every few minutes to add automatically the new pictures taken.
I'm do it with rsync command from console. This command copies the pictures with source user and group but piwigo needs the user and the group to be www-data. I can change this user and group without problem, but if I do this the next synchronization will fail, the rsync command isn't capable to read or rewrite the pictures with the www-data user.
Offline
but piwigo needs the user and the group to be www-data
no, not "piwigo" need. your webserver need. because webserver process is launched by user www-data (you could use a process viewer to check that). i think they make this default to protect against possible transversal attacks ( https://en.wikipedia.org/wiki/Directory … sal_attack ).
i had this kind of problems myself, while PHP-CGI process was started by root, my NGINX process was started by the user www-data. Because of that the webserver had problems in accessing some files, I had to chown the files to www-data.
nginx webserver let you change the user of the process in the config file https://nginx.org/en/docs/ngx_core_module.html#user . i have set mine to "root" and since then i don't have problems with file permissions. of course this is less secure but give the webmaster less headaches.
Offline
You have your webserver running as root?!? Good luck with that.. Seriously, that's about one of the worst things one can do.
Online