0

On Windows 10 Ubuntu subsystem terminal I tried to inspect the disk usage with the following commands:

sudo -s
cd /mnt/c/Users
du -h --max-depth=1

and got this:

du: cannot read directory './D-Ef/AppData/Local/Packages/CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc/LocalState/rootfs': Permission denied
du: cannot read directory './D-Ef/AppData/Local/Packages/CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc/LocalState/temp/{3b734033-965e-4834-ba78-36717e14008d}': Permission denied
Infinity        ./D-Ef
2.7M    ./Default
du: cannot read directory './dmitr': Permission denied
0       ./dmitr
du: cannot read directory './Public/Documents/Hyper-V': Permission denied
1.3M    ./Public
Infinity        .

so obviously root user, for example, does not have the access to these folders.

What Ubuntu user can access Windows folders with administrator privileges?

EDIT1:

if I run Ubuntu.exe as Admin I can assess folders with 'll', but 'du' outputs 'infinity':

enter image description here

EDIT2:

in the current windows user folder I have this:

enter image description here

EDIT3:

another example, both 'll' and 'du' show some strange huge numbers:

enter image description here

enter image description here

My OS versions: Windows 10 1803, ubuntu 18.04.1

22
  • 2
    Try to run ubuntu.exe as Admin.
    – harrymc
    May 25, 2019 at 10:03
  • 1
    I can't reproduce the problem. Running ubuntu as admin, cd /mnt/c/Users/Harry/AppData/, then sudo du -h --max-depth=1, gives some error messages and then the data without "Infinity". Try maybe to check the disk using chkdsk.
    – harrymc
    May 25, 2019 at 15:08
  • 1
    I tried another user, specifically the IIS user, and had no problem. Something is wrong on your computer.
    – harrymc
    May 25, 2019 at 17:44
  • 1
    The problem is probably with WSL improperly translating Windows permissions to Linux ones, as there is absolutely no one-to-one correspondence between the two models.
    – harrymc
    May 25, 2019 at 19:09
  • 1
    The WSL implementation is not perfect, as Microsoft has not done a complete port of Ubuntu to Windows. I think you are discovering some of the raw spots.
    – harrymc
    May 25, 2019 at 20:14

0

You must log in to answer this question.

Browse other questions tagged .