I'm trying to sync data to a NFS share while preserving timestamps.
-rw-rw-r-- 1 simon simon 1554756 Apr 18 2017 IMG_0578-Bearbeitet.jpg
Used rsync options are
While copying I got warnings like
rsync: chgrp "/media/simon/.../.IMG_0578-Bearbeitet.jpg.dXOTKi" failed: Operation not permitted (1)
After the action the file metadata is as follows
-rw------- 1 www-data www-data 1554756 Dez 6 00:59 IMG_0578-Bearbeitet.jpg
chgrp fails because the NFS drive is mounted so that user and group is always set to www-data (options of the nfs share are
I find it now weird that
- There is no error message about the owner that can't be changed too
- As a side effect the time was also not preserved
If I omit the
-g from the rsync options like
-rlptoDvh --progress (everything from
-g), then I get no errors and as a result
-rw-rw-r-- 1 www-data www-data 1554756 Apr 18 2017 IMG_0578-Bearbeitet.jpg
So exactly what I wanted.
What explains these two for me unexpected behaviours?
By the way, omitting just
-o does not give anything and results in the same behaviour as with full