2

What is going on here?

dave@dave-desktop:/mnt/w/Source/Sign/dist$ ls -la total 0 drwxrwxrwx 1 dave dave 512 Feb 27 08:55 . drwxrwxrwx 1 dave dave 512 Feb 27 09:09 .. drwxrwxrwx 1 dave dave 512 Feb 27 09:09 signage dave@dave-desktop:/mnt/w/Source/Sign/dist$ rmdir signage rmdir: failed to remove 'signage': Permission denied dave@dave-desktop:/mnt/w/Source/Sign/dist$ rm -rf signage rm: cannot remove 'signage': Permission denied dave@dave-desktop:/mnt/w/Source/Sign/dist$ whoami dave 

This is on "Ubuntu" running on windows 10 WSL.

11
  • 1
    Is WSL outside the scope of U&L because it's essentially Windows emulating an environment? Similar to asking a wine question on a MS Windows site? ... Commented Feb 27, 2019 at 14:20
  • Maybe. Running Linux in a VM on windows is also technically emulation. But there are certainly some extreme differences between the two. For example, netstat doesn't work at all, ps shows a limited process list, etc. Still, all I'm looking for is, is there anything going on here that would cause this on a linux system? If not, then I'm happy with just assuming this is Windows shenanigans. Commented Feb 27, 2019 at 14:28
  • The /mnt prefix indicates that this may be removable storage of some kind. Is this a mounted filesystem, and what type? Commented Feb 27, 2019 at 14:28
  • W: on /mnt/w type drvfs (rw,noatime,uid=1000,gid=1000,case=off) Commented Feb 27, 2019 at 14:34
  • 1
    You are correct that it was locked. lsof shows nothing, but I found it with windows process explorer. I had a cmd.exe open in that directory. Commented Feb 27, 2019 at 14:52

3 Answers 3

3

Permissions don't work as expected in mounted Windows directories in WSL.

See this example:

root@x250:/mnt/c/Temp# touch foo root@x250:/mnt/c/Temp# ls -l foo -rwxrwxrwx 1 ibm ibm 0 Feb 27 15:25 foo root@x250:/mnt/c/Temp# chmod -v 644 foo mode of 'foo' changed from 0777 (rwxrwxrwx) to 0644 (rw-r--r--) root@x250:/mnt/c/Temp# ls -l foo -rwxrwxrwx 1 ibm ibm 0 Feb 27 15:25 foo 

Yuck!

1
  • I just want to know, What do people expect about permissions on NTFS. It has much more complex ACL model and only use SID(including user/group). So, why can we mount a NTFS without SID-UID/GID mapping and expect it work like a normal linux filesystem? Commented Feb 28, 2019 at 10:23
2

I can't even delete this directory from MS-Windows.

I found it with Windows process explorer.

It was locked. lsof shows nothing, but I found it with windows process explorer. I had a cmd.exe open in that directory.

-4

If the account "dave", which was used to create the directory, has root privileges, try sudo rm -r signage

1
  • 2
    sudo is not the solution to all problems, though it is often the cause. Commented Feb 27, 2019 at 14:37

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.