Skip to content

ls command has no output in mounted drives #6556

Closed

Description

Environment

Microsoft Windows [Version 10.0.19042.746]
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=kali
VERSION="2020.4"
VERSION_ID="2020.4"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debian
Linux version 4.4.0-19041-Microsoft ([email protected]) (gcc version 5.4.0 (GCC) ) #488-Microsoft Mon Sep 01 13:43:00 PST 2020

Windows build number: [run `cmd.exe /c ver`]
Your Distribution version: [On Debian or Ubuntu run `lsb_release -r` in WSL]
Whether the issue is on WSL 2 and/or WSL 1: [run `cat /proc/version` in WSL]

Steps to reproduce

sudo mkdir /mnt/z
sudo mount -t drvfs Z: /mnt/z
cd /mnt/z
ls

strace: command not found

WSL logs: cannot be provided

C:\Users\localadmin\Downloads>wpr -start wsl.wprp -filemode

        Error code: 0xc00cee4f

Additional Information

Output of mount:

rootfs on / type lxfs (rw,noatime)
none on /dev type tmpfs (rw,noatime,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620)
none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime)
none on /run/shm type tmpfs (rw,nosuid,nodev,noatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
C:\ on /mnt/c type drvfs (rw,noatime,uid=1000,gid=1000,case=off)
Z: on /mnt/z type drvfs (rw,relatime,case=off)

Tab autocomplete of files and paths doesn't work too.

Expected behavior

I expect to see my files and folders on this drive listed.

Actual behavior

Instead I have no output.
The exit code of ls is 0 though.

Activity

  1. Biswa96 commented on Feb 16, 2021

    @Biswa96

    I think the cause is the absence of mount metadata options. Try this command

    sudo mount -t drvfs Z: /mnt/z -o metadata,uid=1000,gid=1000
    
  2. serkonda7 commented on Feb 16, 2021

    @serkonda7
    Author

    Sadly this doesn't fix the problem.

    Also he docs say that metadata is enabled by default.

    Further I tried passing the exact same options that are listed for the C drive (ls works here).
    But for my manually mounted Z it doesn't work either.

  3. serkonda7 commented on Feb 16, 2021

    @serkonda7
    Author

    Maybe this information is helpful:

    • The problem occurs in a Virtual Box Windows VM on a Win10 host (I have no rights to use WSL outside a VM).
    • The Z drive is the mounting point of a shared folder between Host and VM.
  4. therealkenc commented on Feb 16, 2021

    @therealkenc

    Landing zone /dupe #2896.

  5. ghost closed this as completedon Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions