User file does not have metadata (default) The result depends on if the file already has existing metadata. Which Linux user and Linux group owns the file? The file's permission bits are set to follow the Linux umask, and the file will be saved with metadata. The Windows permissions of the newly created file will be the same as if you created the file in Windows without a specific security descriptor, it will inherit the parent's permissions. The result depends on if metadata is enabled. This is thanks to interoperability, as any read or write commands to Windows files are routed through your Windows user permissions. For example, you could set the metadata to display that you have write permissions to a file using chmod 777, but if you tried to access that file you would still not be able to write to it. Please keep in mind that you cannot give yourself more access than what you have on Windows, even if the metadata says that is the case. chmod file has metadataĬhmod will change or add metadata depending on the file's already existing metadata. chmod file does not have metadata (default)Ĭhmod will only have one effect, if you remove all the write attributes of a file then the 'read only' attribute on the Windows file will be set, since this is the same behaviour as CIFS (Common Internet File System) which is the SMB (Server Message Block) client in Linux. Changing file permissions on an existing Windows file using chmod If the file has metadata present, we simply use those metadata values instead of translating effective permissions of the Windows user. If the file has the 'Read Only' attribute set in Windows then we do not grant write access in Linux. For example, if your Windows user account has read and execute access but not write access to the file then this will be shown as r-x for user, group and other. If the file has no metadata associated with it then we translate the effective permissions of the Windows user to read/write/execute bits and set them to the this as the same value for user, group, and other. DrvFS file does not have metadata (default) Reading file permissions from an existing Windows file These scenarios occur when you are accessing your Windows files from WSL, most likely via /mnt/c. Accessing Files in the Windows drive file system (DrvFS) from Linux File Access Scenariosīelow is a description of how permissions are determined when accessing files in different ways using the Windows Subsystem for Linux. This makes it much faster to determine the kind of file in a given directory without having to query its extended attributes. WSL can add four NTFS extended attributes: Attribute Nameįile mode (File systems permission octals and type, e.g: 0777)Īdditionally, any file that is not a regular file or directory (e.g: symlinks, FIFOs, block devices, unix sockets, and character devices) also have an NTFS reparse point. When metadata is enabled as a mount option in WSL, extended attributes on Windows NT files can be added and interpreted to supply Linux file system permissions. When accessing Windows files from WSL the file permissions are either calculated from Windows permissions, or are read from metadata that has been added to the file by WSL. This documentation assumes a basic understanding of the Linux file system permissions structure and the umask command. This page details how Linux file permissions are interpreted across the Windows Subsystem for Linux, especially when accessing resources inside of Windows on the NT file system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |