Environment
Windows build number: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0
Your Distribution version: Release: 20.04
Whether the issue is on WSL 2 and/or WSL 1: Linux version 4.4.0-18362-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #1049-Microsoft Thu Aug 14 12:01:00 PST 2020
Steps to reproduce
Content of ~/etc/wsl.conf
~ > cat etc/wsl.conf
[automount]
enabled = true
options = metadata,umask=22,fmask=11
mountFsTab = false
Restart LxssManager, and then check whether /mnt/e has metadata - no, it does not
~ > cd /mnt/e
e > mount -l
E:\ on /mnt/e type drvfs (rw,noatime,uid=1000,gid=1000,case=off)
Trying to chmod - does not work
~ > cd /mnt/e/roots/bedrock-sites/roots-example.com/trellis
trellis > chmod -v 600 .vault_pass
mode of '.vault_pass' changed from 0777 (rwxrwxrwx) to 0600 (rw-------)
trellis > stat --format '%a' .vault_pass
777
Unmount and remount /mnt/e, then check for metadata - yes, it has metadata
~ > sudo umount /mnt/e
~ > sudo mount -t drvfs E: /mnt/e -o metadata
E: on /mnt/e type drvfs (rw,relatime,metadata,case=off)
~ >
Now I can chmod successfully, but only with sudo chmod
~ > cd /mnt/e/roots/bedrock-sites/roots-example.com/trellis
trellis > chmod -v 600 .vault_pass
chmod: changing permissions of '.vault_pass': Operation not permitted
failed to change mode of '.vault_pass' from 0777 (rwxrwxrwx) to 0600 (rw-------)
trellis > sudo chmod -v 600 .vault_pass
mode of '.vault_pass' changed from 0777 (rwxrwxrwx) to 0600 (rw-------)
trellis > stat --format '%a' .vault_pass
600
Expected behavior
I expect that after setting up wsl.conf as below, which seemed to be the conclusion from Issue #81, the command chmod can be used to set permissions metadata for files without needing to manually unmount and remount my hard drive with metadata.
[automount]
enabled = true
options = "metadata"
mountFsTab = false
Actual behavior
chmod will not work unless I manually unmount and remount the drive, every single time that I restart the WSL service.
> sudo umount /mnt/c
> sudo mount -t drvfs C: /mnt/c -o metadata
I'm very sorry if I missed something from automatically-configuring-wsl or chmod-chown-wsl-improvements. I have been stuck here for a few days.
Environment
Steps to reproduce
Content of ~/etc/wsl.conf
Restart LxssManager, and then check whether /mnt/e has metadata - no, it does not
Trying to chmod - does not work
Unmount and remount /mnt/e, then check for metadata - yes, it has metadata
Now I can chmod successfully, but only with sudo chmod
Expected behavior
I expect that after setting up
wsl.confas below, which seemed to be the conclusion from Issue #81, the commandchmodcan be used to set permissions metadata for files without needing to manually unmount and remount my hard drive with metadata.Actual behavior
chmodwill not work unless I manually unmount and remount the drive, every single time that I restart the WSL service.I'm very sorry if I missed something from automatically-configuring-wsl or chmod-chown-wsl-improvements. I have been stuck here for a few days.