关闭。这个问题是off-topic .它目前不接受答案。
想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。
8年前关闭。
Improve this question
我正在使用 Cygwin 的 cp.exe 在 Windows 7 中复制文件。不幸的是,当我更改文件的权限时。
我试过使用:
cp --preserve=all
但这也不起作用,当我检查原始文件与副本的安全性时,副本具有不同的权限。
显然,在使用 Cygwin 进行复制时必须有一种方法可以保留权限,但我找不到它。
最佳答案
我相信将选项 noacl 添加到/etc/fstab 中的/cygdrive 挂载点将满足您的需求。
$ cat fstab
# For a description of the file format, see the Users Guide
# http://cygwin.com/cygwin-ug-net/using.html#mount-table
# This is default anyway:
# none /cygdrive cygdrive binary,posix=0,user 0 0
none /cygdrive cygdrive binary,posix=0,user,noacl 0 0
请参阅 cygwin 邮件列表中的 http://cygwin.com/cygwin-ug-net/using.html#mount-table 和 discussion。
关于permissions - 如何使用 Cygwin 中的 cp.exe 并保留权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8421049/