filemodes.sgml
来自「cygwin, 著名的在win32下模拟unix操作系统的东东」· SGML 代码 · 共 35 行
SGML
35 行
<sect1 id="using-filemodes"><title>File permissions</title><para>On Windows 9x systems, files are always readable, and Cygwin uses thenative read-only mode to determine if they are writable. Files areconsidered to be executable if the filename ends with .bat, .com or .exe, orif its content starts with #!. Consequently <command>chmod</command> canonly affect the "w" mode, it silently ignores actions involving the othermodes. This means that <command>ls -l</command>needs to open and read files. It can thus be relatively slow.</para><para>Under NT, file permissions default to the same behavior as Windows9x but there is optional functionality in Cygwin that can make filesystems behave more like on UNIX systems. This is turned on by addingthe "ntea" option to the <EnVar>CYGWIN</EnVar> environment variable.</para><para>When the "ntea" feature is activated, Cygwin will start with basicpermissions as determined above, but can store POSIX file permissions in NTExtended Attributes. This feature works quite well on NTFS partitionsbecause the attributes can be stored sensibly inside the normal NTFSfilesystem structure. However, on a FAT partition, NT stores extendedattributes in a flat file at the root of the partition called <filename>EADATA. SF</filename>. This file can grow to extremely large sizes if youhave a large number of files on the partition in question, slowing thesystem to a crawl. In addition, the <filename>EA DATA. SF</filename> filecan only be deleted outside of Windows because of its "in use" status. Forthese reasons, the use of NT Extended Attributes is off by default inCygwin. Finally, note that specifying "ntea" in <EnVar>CYGWIN</EnVar> has noeffect under Windows 9x. </para><para>Under NT, the test "[ -w filename]" is only true if filename iswritable across the board, e.g. <command>chmod +w filename</command>. </para></sect1>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?