Announcement

#1 2019-06-29 23:58:17

Asaber
Member
2019-06-29
1

Synchronize gallery files automatically

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

 

#2 2019-07-05 09:33:59

eliz82
Member
Romania
2016-04-27
281

Re: Synchronize gallery files automatically

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

 

#3 2019-07-06 11:11:04

erAck
Only trying to help
2015-09-06
2023

Re: Synchronize gallery files automatically

You have your webserver running as root?!? Good luck with that.. Seriously, that's about one of the worst things one can do.


Running Piwigo at https://erack.net/gallery/

Online

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact