Question: how to chown files?
Bogdaan opened this issue · 6 comments
Rsync have options:
--chown=USER:GROUP
--user=user
--grou=group
Args not work:
args: '--owner www-data --group www-data',
It posible to use this options?
Args needs to be an array, have you tried
args: ['--owner www-data','--group www-data']
Not works, and i try
['--chown www-data:www-data']
Can you try copy and pasting the generated command into your shell, and see if it works outside grunt-rsync? i.e. take the bit
Shell command was: <copy and paste this>
And run it directly. We can find out if there's a problem with the generated command, or something else ...
-
args: ['--owner www-data','--group www-data']
Shell command was: rsync . root@i:/var/www/i --rsh "ssh -i ~/.ssh/id" --recursive --delete --exclude=.git* --exclude=node_modules --owner www-data --group www-data
ERROR
Error: rsync exited with code 1 -
args: ['--chown www-data:www-data'],
no errors, but chown not works on remote
The correct list of arguments is args: ['--chown www-data:www-data', '--owner', '--group']
.
--chown=user:group
tells your copy of rsync to chown the file while transferring it. --owner
and --group
tells the other end to preserve those changes when receiving it.
Ty for the info :)