文件权限在构建过程中更改,编译因访问被拒绝而中止(Windows,Cygwin)
File permissions changed in build process, compilation aborts because access denied (Windows, Cygwin)
我正在尝试构建 ArangoDB using the official build scripts and following the official Windows build instructions。
构建过程中的多个步骤似乎与文件权限有关,因此编译失败,因为无法再访问所需的文件。我也无法在任何程序中打开它们(访问被拒绝,无法加载,...),即使是 admin 用户并具有提升的权限.
到目前为止,我的解决方法是 运行 takeown /F . /R
和 icacls . /T /C /Q /reset
例如V8-4.3.61\build
拥有文件并从管理员 shell 重置权限。但是在最后 make pack-win64
.
期间解决权限问题不再有效
我想知道为什么首先要更改权限。 ArangoDB 团队提供的脚本似乎并没有改变这些设置。所以它必须是在过程中调用的第 3 方构建脚本 (gyp
?!)、cygwin 环境 (bash
、make
、...) 或编译器 (msbuild
?)。我不认为它可能与 git
或 cmake
有关,但也涉及这些。
- Windows 7 64 位
- Visual Studio 2013 终极版
- Cygwin 2.2.0
- cmake 3.3.1
为 cygwin 中的所有挂载关闭 ACL (noacl
) 显然修复了权限问题:
# /etc/fstab
#
# This file is read once by the first process in a Cygwin process tree.
# To pick up changes, restart all Cygwin processes. For a description
# see https://cygwin.com/cygwin-ug-net/using.html#mount-table
# noacl = Ignore Access Control List and let Windows handle permissions
C:/cygwin64/bin /usr/bin ntfs binary,auto,noacl 0 0
C:/cygwin64/lib /usr/lib ntfs binary,auto,noacl 0 0
C:/cygwin64 / ntfs override,binary,auto,noacl 0 0
none /cygdrive cygdrive binary,posix=0,user,noacl 0 0
顺便说一句,你 运行
mkpasswd > /etc/passwd
mkgroup > /etc/group
什么时候?因为这也可以设置适当的权限(如果 cygwin 首先知道映射)
我正在尝试构建 ArangoDB using the official build scripts and following the official Windows build instructions。
构建过程中的多个步骤似乎与文件权限有关,因此编译失败,因为无法再访问所需的文件。我也无法在任何程序中打开它们(访问被拒绝,无法加载,...),即使是 admin 用户并具有提升的权限.
到目前为止,我的解决方法是 运行 takeown /F . /R
和 icacls . /T /C /Q /reset
例如V8-4.3.61\build
拥有文件并从管理员 shell 重置权限。但是在最后 make pack-win64
.
我想知道为什么首先要更改权限。 ArangoDB 团队提供的脚本似乎并没有改变这些设置。所以它必须是在过程中调用的第 3 方构建脚本 (gyp
?!)、cygwin 环境 (bash
、make
、...) 或编译器 (msbuild
?)。我不认为它可能与 git
或 cmake
有关,但也涉及这些。
- Windows 7 64 位
- Visual Studio 2013 终极版
- Cygwin 2.2.0
- cmake 3.3.1
为 cygwin 中的所有挂载关闭 ACL (noacl
) 显然修复了权限问题:
# /etc/fstab
#
# This file is read once by the first process in a Cygwin process tree.
# To pick up changes, restart all Cygwin processes. For a description
# see https://cygwin.com/cygwin-ug-net/using.html#mount-table
# noacl = Ignore Access Control List and let Windows handle permissions
C:/cygwin64/bin /usr/bin ntfs binary,auto,noacl 0 0
C:/cygwin64/lib /usr/lib ntfs binary,auto,noacl 0 0
C:/cygwin64 / ntfs override,binary,auto,noacl 0 0
none /cygdrive cygdrive binary,posix=0,user,noacl 0 0
顺便说一句,你 运行
mkpasswd > /etc/passwd
mkgroup > /etc/group
什么时候?因为这也可以设置适当的权限(如果 cygwin 首先知道映射)