Windows Services for Linux [WSL] zip files read only?

Start WSL/Ubuntu-2004 console.
Create a zip archive:

[email protected]:/mnt/c/Users/user$ cd

[email protected]:~$ echo "1" > 1

[email protected]:~$ zip 1.zip 1
  adding: 1 (stored 0%)

Cannot remove the archive:

[email protected]:~$ rm 1.zip
rm: cannot remove '1.zip': Permission denied

[email protected]:~$ sudo rm 1.zip
rm: cannot remove '1.zip': Permission denied

[email protected]:~$ ls -l 1.zip
-rw-r--r-- 0 user user 154 May  4 11:13 1.zip

Strace:

newfstatat(AT_FDCWD, "1.zip", {st_mode=S_IFREG|0644, st_size=154, ...}, AT_SYMLINK_NOFOLLOW) = 0
unlinkat(AT_FDCWD, "1.zip", 0)          = -1 EACCES (Permission denied)

Although is appears ok:

[email protected]:~$ file 1.zip
1.zip: Zip archive data, at least v1.0 to extract

[email protected]:~$ stat 1.zip
  File: 1.zip
  Size: 154             Blocks: 0          IO Block: 512    regular file
Device: 2h/2d   Inode: 1688849860306603  Links: 0
Access: (0644/-rw-r--r--)  Uid: ( 1000/user)   Gid: ( 1000/user)
Access: 2021-05-04 11:13:52.842728000 -0700
Modify: 2021-05-04 11:13:52.849731900 -0700
Change: 2021-05-04 11:13:52.851746600 -0700
 Birth: -

And I am user 1000:

[email protected]:~$ id
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),20(dialout),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),117(netdev)

Source: Windows Questions

LEAVE A COMMENT