I'm copying files from my workstation to a dev sandbox, locally I don't have the www-data
user, which is needed by my web server.
Is there a way to set up an user_id for files synced by unison?
I'm copying files from my workstation to a dev sandbox, locally I don't have the www-data
user, which is needed by my web server.
Is there a way to set up an user_id for files synced by unison?
Much depends on how you use unison and on which operating system(s) it operates. Next time (next question), please include any information to understand the exact situation, that gives you trouble.
Anyway - some ideas for you:
chmod 644
orchmod 755
for read or read-and-execute).Add www-data to your user's group.
When I stumbled across this question, what I did is to add the www-data user to my user's group (ie john:john) and www-data, being in the john group allowed me to use permissions like 775 (directories) and 664 in certain places.
NOTE: most places it's still fine to only give www-data read-only access. In this case that would be the 755 (directories) and the 644 (files).