I'm using cp.exe from Cygwin to copy files in Windows 7. Unfortunately, when I do the permissions of the file change.
I've tried using:
cp --preserve=all
But that doesn't work either, and when I check the security of the original file vs the copy, the copy has different permissions.
Clearly there must be a way to preserve permissions when copying using Cygwin, but I can't find it.
cp --preserver=all
is probably the best you're going to be able to do with thecp
command. Exactly what permissions are different? Are you copying to a FAT32 file system? If so, it may not support the permissions you want. – Garciacp --preserve=all
doesn't work on win7 atleast. cygwin cp permissions are still out of whack! – Bobbitt