WSL file access right problem

Stanislas JEANGEY 0 Reputation points
2023-10-30T06:17:48.0433333+00:00

Hello,

I recently installed Windows Server Datacenter 2022, installed the Docker-Desktop.exe application and then installed Ubuntu using the following command: wsl --install Ubuntu

I then launched Ubuntu and configured the first boot, then added my current user and root to the www-data group.

I did this to be able to access, from Windows Explorer, the WSL files located at \wsl.localhost.

I then set up docker-desktop to use the Ubuntu distribution.

The problem is that at startup I have access to the files, but as soon as I try to perform an operation on the files, I lose access rights.

I've also added a file in the following directory: /etc/wsl.conf which contains the following:

# Enable extra metadata options by default
[automount]
enabled = true
root = /windir/
options = "metadata,umask=22,fmask=11"
mountFsTab = false
[network]
generateHosts = true
generateResolvConf = true
How can I keep access rights to files?
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,103 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.