I want to mess with Permission of Windows directory from WSL (ubuntu)

Thing you want to do

I want to mess with the permission (chmod, chown) of Windows directory files from the terminal on ubuntu running on WSl!

In WSL, even if you use the chmod command with sudo authority, the permission does not change at all.


When mounting the Windows directory (/ mnt / c), it seems that it cannot be done because there is no metadata setting.

$ mount | grep -i ^C:
result: C:\ on /mnt/c type drvfs (rw,noatime,uid=1000,gid=1000,case=off)

things to do

  1. Add metadata to the mount option. Create etc / wsl.conf
$ sudo tee /etc/wsl.conf <<EOF >/dev/null
options = "metadata"
  1. Remount / mnt / c or restart Windows


Command when you want to mount under / mnt / c directory of ubuntu under / c

$ sudo mount --bind /mnt/c /c

Recommended Posts

I want to mess with Permission of Windows directory from WSL (ubuntu)
I want to redirect sound from Ubuntu with xrdp
I want to play with Firestore from Rails
How to Burning a Install Disk of Windows from Ubuntu
I want to fetch another association of the parent model from the intermediate table with has_many
I want to recreate the contents of assets from scratch in the environment built with capistrano
Results of trying to use NVENC (CUDA) with Ubuntu 18.04 on WSL2
The story of fighting ubuntu errors 0x80370114, 0x80000000 to enable docker desktop with wsl2 on windows10 home
I want to use DBViewer with Eclipse 2018-12! !!
I want to install PHP 7.2 on Ubuntu 20.04.
RDP connection from Windows 10 to Ubuntu Desktop 20.04
I want to display images with REST Controller of Java and Spring!
I want to test Action Cable with RSpec test
I want to output the day of the week
I want to control the start / stop of servers and databases with Alexa
I want to graduate from npm install properly [2020]
I want to use java8 forEach with index
I want to var_dump the contents of the intent
Rails6 I want to make an array of values with a check box
I want to write quickly from java to sqlite
How to start with Hyper-V instead of WSL2 on Docker Desktop for Windows
I want to perform aggregation processing with spring-batch
[Rails] I want to load CSS with webpacker
I want to reduce the number of unnecessary queries. From considering counter_cache to introducing counter_culture.
I want to call a method of another class
[Java] I want to calculate the difference from the date
I built an Ubuntu environment on Windows 10 using WSL2.
I want to know the answer of the rock-paper-scissors app
I want to display the name of the poster of the comment
I want to dark mode with the SWT app
I want to monitor a specific file with WatchService
I want to authenticate users to Rails with Devise + OmniAuth
I want to transition screens with kotlin and java!
I want to get along with Map [Java beginner]
I want to be aware of the contents of variables!
I want to return the scroll position of UITableView!
I want to connect to Heroku MySQL from a client
[Ubuntu20.04] From ROS-noetic installation to SLAM simulation of turtlebot3
I can't input Japanese with VS code (Visual Studio Code) of Ubuntu 18.04.5! ?? If you want to download VS Code to Ubuntu, go to the official website! !!
I want to return a type different from the input element with Java8 StreamAPI reduce ()
I want to use screen sharing on the login screen on Ubuntu 18
I want to push an app made with Rails 6 to GitHub
I want to expand the clickable part of the link_to method
I want to make a specific model of ActiveRecord ReadOnly
I want to change the log output settings of UtilLoggingJdbcLogger
I want to make a list with kotlin and java!
I want to make a function with kotlin and java!
Even in Java, I want to output true with a == 1 && a == 2 && a == 3
I tried to automate LibreOffice Calc with Ruby + PyCall.rb (Ubuntu 18.04)
I want to manually send an authorization email with Devise
I tried to build the environment of WSL2 + Docker + VSCode
I want to distinct the duplicated data with has_many through
I want to implement various functions with kotlin and java!
I want to narrow down the display of docker ps
[Ruby] I want to reverse the order of the hash table
I want to temporarily disable the swipe gesture of UIPageViewController
I tried upgrading from CentOS 6.5 to CentOS 7 with the upgrade tool
I want to pass the startup command to postgres with docker-compose.
[Java] I want to test standard input & standard output with JUnit
[Controller] I want to retrieve the numerical value of a specific column from the DB (my memo)
I want to automate from project creation to GitHub repo creation, Initial Commit to git push with one command