←back to thread

Ubuntu on Windows

(blog.dustinkirkland.com)
2049 points bpierre | 8 comments | | HN request time: 1.011s | source | bottom
1. cabirum ◴[] No.11391054[source]
Are posix permissions supported/emulated? Or are they set to 777 for all Windows drives in /mnt like shared folders in a VM?
replies(4): >>11391267 #>>11393116 #>>11393552 #>>11445615 #
2. the_mitsuhiko ◴[] No.11391267[source]
Yeah, that's something that really interests me. Likewise I want to know how extended attributes and streams are mapped.
replies(1): >>11391408 #
3. andoma ◴[] No.11391408[source]
Or unlinking an open file. Something you can't do on traditional Windows kernels IIRC.
replies(1): >>11415366 #
4. alternize ◴[] No.11393116[source]
in the demo video https://channel9.msdn.com/Events/Build/2016/P488 it's visible at 05:53 that the files all belong to root:root and have mode 777
replies(1): >>11393599 #
5. AaronFriel ◴[] No.11393552[source]
It looks like alternize was almost right, at 4:39 you can see that within the Ubuntu (not /mnt) part, default permissions are used. e.g.: `ls -l proc` reveals that much of it is read only.

If the Ubuntu on Windows personality/subsystem gave Linux processes full permissions to /mnt/c, I'd expect that would be a security vulnerability, and I'd assume they are doing some mapping. Unfortunately, in the video they posted I never see them do `ls -l` on `/mnt/c`, only a subdirectory they created.

6. recrof ◴[] No.11393599[source]
reminds me of '90 teleshopping videos..
7. JdeBP ◴[] No.11415366{3}[source]
You recall incorrectly. Windows NT kernels have been able to unlink open files right from the get-go, at the start of the 1990s. They had to be, in order to support the POSIX subsystem.

When files are manipulated through the Win32 subsystem they are (normally) opened in "deny delete" mode (i.e. without passing FILE_SHARE_DELETE to CreateFile and thence to NtCreateFile). But that's Win32 programs and language runtime libraries explicitly setting the sharing mode flags that they like, not an inability of the Windows NT kernel that is below the Win32 subsystem, nor even an inability of the Win32 subsystem itself.

* https://msdn.microsoft.com/en-gb/library/windows/desktop/aa3...

8. AaronFriel ◴[] No.11445615[source]
Correction: filesystem permissions are not fully emulated, but they aren't disobeyed either. Looks like everything obeys the user's permissions, which is good, but everything under /mnt shows up as 777 root/root.