From 0a58727caff36d6c158d0bea1e2b3e6cd15bb1b4 Mon Sep 17 00:00:00 2001 From: "Jimmy V. Liu" Date: Fri, 9 Aug 2024 11:47:46 -0700 Subject: [PATCH] Fix umask default for DrvFs automount Properly fixes #1767 in a way that is consistent with the real behavior of WSL2. Although 8c167d6 removes inconsistency between the automount table and the paragraph on line 93, it does not match the real behavior of WSL2: I observed by experimenting with /etc/wsl.conf that no umask is applied by default. --- WSL/wsl-config.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WSL/wsl-config.md b/WSL/wsl-config.md index ce69f228..825725e4 100644 --- a/WSL/wsl-config.md +++ b/WSL/wsl-config.md @@ -82,7 +82,7 @@ Setting different mount options for Windows drives (DrvFs) can control how file |:----|:----|:----| |uid| The User ID used for the owner of all files | The default User ID of your WSL distro (on first installation this defaults to 1000) |gid| The Group ID used for the owner of all files | The default group ID of your WSL distro (on first installation this defaults to 1000) -|umask | An octal mask of permissions to exclude for all files and directories | 022 +|umask | An octal mask of permissions to exclude for all files and directories | 000 |fmask | An octal mask of permissions to exclude for all files | 000 |dmask | An octal mask of permissions to exclude for all directories | 000 |metadata | Whether metadata is added to Windows files to support Linux system permissions | disabled @@ -90,7 +90,7 @@ Setting different mount options for Windows drives (DrvFs) can control how file By default, WSL sets the uid and gid to the value of the default user. For example, in Ubuntu, the default user is uid=1000, gid=1000. If this value is used to specify a different gid or uid option, the default user value will be overwritten. Otherwise, the default value will always be appended. -User file-creation mode mask (umask) sets permission for newly created files. The default is 022, only you can write data but anyone can read data. Values can be changed to reflect different permission settings. For example, `umask=077` changes permission to be completely private, no other user can read or write data. To further specify permission, fmask (files) and dmask (directories) can also be used. +User file-creation mode mask (umask) sets permission for newly created files. The default is 000, meaning anyone can read, write, or execute files. Values can be changed to reflect different permission settings. For example, `umask=077` changes permission to be completely private, no other user can read or write data. To further specify permission, fmask (files) and dmask (directories) can also be used. > [!NOTE] > The permission masks are put through a logical OR operation before being applied to files or directories.