Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<path> is not accessible from Windows explorer #9282

Closed
1 of 2 tasks
webian opened this issue Dec 8, 2022 · 9 comments
Closed
1 of 2 tasks

<path> is not accessible from Windows explorer #9282

webian opened this issue Dec 8, 2022 · 9 comments
Assignees
Labels

Comments

@webian
Copy link

webian commented Dec 8, 2022

Version

Windows 11 Pro 22621.900

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

Linux version 5.15.74.2-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220)

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

If I try to browse my WSL from Windows Explorer, it often gives me permission errors as in the table below. The Windows user has the same name as the Linux user: tom
Linux user 'tom' is in the 'www-pub' group.

Linux path and permissions                       Accessible from Win?   Writable from Win?
------------------------------------------------------------------------------------------
drwxr-xr-x root     root    var/                 Y                      N
drwxrwsrwx www-data www-pub var/www/             Y                      Y
drwxrwsr-- www-data www-pub var/www/html/        Y                      N
drwxrws--- tom      www-pub var/www/html/test/   N                      n/a

Seems like inconsistent behavior to me.

Expected Behavior

Linux path and permissions                       Accessible from Win?   Writable from Win?
------------------------------------------------------------------------------------------
drwxr-xr-x root     root    var/                 Y                      N
drwxrwsrwx www-data www-pub var/www/             Y                      Y
drwxrwsr-- www-data www-pub var/www/html/        Y                      Y
drwxrws--- tom      www-pub var/www/html/test/   Y                      Y

Actual Behavior

See 'Repro Steps'.

Diagnostic Logs

No response

@webian
Copy link
Author

webian commented Dec 8, 2022

It seems that WSL doesn't recognize 'tom' as user of group 'www-pub'.
By instance: it allows me to browse /var/www/html/ because of the read permission for others. If I remove that permission I can't browse that folder anymore.

@webian
Copy link
Author

webian commented Dec 8, 2022

Also, it doesn't allow me to browse /var/www/html/test until I set x for others for /var/www/html/:
sudo chmod o+x /var/www/html/
and, after this setting, I can also write in /var/www/html/test even if others can't write /var/www/html/ but it is because /var/www/html/test is owned by user 'tom'
If I change owner of /var/www/html/test to 'www-data' then I can't browse it anymore.

@OneBlue
Copy link
Collaborator

OneBlue commented Dec 13, 2022

Thanks for reporting this @webian. What's the default user and groups of your WSL distro ?

Can you share the output of wsl.exe groups and wsl.exe whoami ?

@webian
Copy link
Author

webian commented Dec 14, 2022

PS D:\Users\tom> wsl.exe groups
tom adm dialout cdrom floppy sudo audio dip video plugdev netdev www-pub
PS D:\Users\tom> wsl.exe whoami
tom

A special configuration of my Windows 11 is that user folders are on partition D: instead of C:. Could this affect?

@ghost ghost closed this as completed Dec 21, 2022
@ghost
Copy link

ghost commented Dec 21, 2022

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-open it.

Thank you!

@ghost ghost removed the needs-author-feedback label Dec 21, 2022
@OneBlue OneBlue reopened this Dec 21, 2022
@OneBlue OneBlue self-assigned this Dec 27, 2022
@OneBlue OneBlue added the bug label Dec 27, 2022
@OneBlue
Copy link
Collaborator

OneBlue commented Dec 27, 2022

Thanks for the details @webian.

I confirm I can reproduce the issue. Digging into the plan9 server logic, I can tell that this is a limitation of the \wsl.localhost at the moment: Additional groups are not processed when accessing files, which is why you're getting access denied

@nietzscheanic
Copy link

@OneBlue a reported issue since nearly 2.5 years - and a really annoying one 😢

#5987

@nietzscheanic
Copy link

@SvenGroot maybe something you could fix with some magic

@OneBlue
Copy link
Collaborator

OneBlue commented Jan 20, 2023

@nietzscheanic: This issue has been fixed with WSL 1.1.0 (In pre-release for now).

Closing

@OneBlue OneBlue closed this as completed Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants