【问题标题】:chmod via cygwin not working properly on windows通过 cygwin 的 chmod 在 Windows 上无法正常工作
【发布时间】:2015-08-31 11:45:40
【问题描述】:

我正在尝试将 Windows 上某些文件的权限更改为仅适用于所有者用户的“rw”。如您所见,文件已更改为“rw------”。当我再次列出文件时,什么都没有改变。

【问题讨论】:

标签: permissions window cygwin chmod


【解决方案1】:

chmod 只是在 Windows 中为 Cygwin 和 MSys 模拟。

解决此问题的最佳方法是使用icacls 更改权限。

命令行可以在微软官方文档中找到,比如here

请注意,Msys 或 Cygwin 中的 chmod 状态可能不正确。例如,这是我在删除对“toto.txt”的所有访问后在 Msys 中得到的

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-01-19
    • 2010-11-07
    • 2021-07-19
    • 2011-08-21
    • 2020-08-04
    • 2016-04-11
    • 1970-01-01
    • 2019-09-01
    相关资源
    最近更新 更多