g_file_copy always preserves permissions, even if G_FILE_COPY_ALL_METADATA flag is not set
Submitted by Josselin Mouette
Link to original bug (#560494)
Description
[ Original report: http://bugs.debian.org/505398 by Maximiliano Curia ]
gio's g_file_copy can be tested using gvfs-copy command from the gvfs-bin package or hacking nautilus from experimental to not set G_FILE_COPY_ALL_METADATA.
A simple test:
$ mkdir src dst; touch src/test; chmod 7777 src/test; cp src/test dst/cp $ gvfs-copy src/test dst/gvfs-copy; ls -l dst total 0 -rwxr-xr-x 1 maxy maxy 0 nov 12 2008 cp -rwsrwsrwt 1 maxy maxy 0 nov 12 2008 gvfs-copy
This behavior is incompatible with acls default settings and users umask setting.
Version: 2.16.x