ubuntu-wsl / wslu : needs /mnt/c/windows/system32/ in PATH env variable

Bug #1877016 reported by Rafael David Tinoco on 2020-05-06
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
wslu (Ubuntu)
Status tracked in Groovy
Xenial
High
Patrick Wu
Bionic
High
Patrick Wu
Focal
High
Patrick Wu
Groovy
High
Patrick Wu

Bug Description

[Impact]

This affects all wslu tools on all releases. When PATH do not include Windows path, the all tools will complain that reg.exe is not found.

[Test Case]

 * Add appendWindowsPath = false under [interop] section in /etc/wsl.conf file, and restart the distribution
 * run any wslu tool (like wslfetch)
 * "/mnt/c/Windows/System32/reg.exe: Permission denied" should not be shown

[Regression Potential]

* For future release of wslu 3.1.0 proposed, huge refactoring will be needed.

[Original Bug Report]

ubuntu-wsl / wslu : needs /mnt/c/windows/system32/ in PATH env variable

$ wslfetch
/usr/bin/wslfetch: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 183: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 185: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 187: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 189: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 183: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 185: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 187: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 189: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 183: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 185: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 187: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 189: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 183: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 185: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 187: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 189: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 183: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 185: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 187: /mnt/c/Windows/System32/reg.exe: Permission denied
/usr/bin/wslsys: line 189: /mnt/c/Windows/System32/reg.exe: Permission denied

                          ./+o+- Windows 10 Linux Subsystem
                  yyyyy. 'yyyyyy+ rafaeldtinoco@lenovo
              .;//+/////h yyyyyyo BUILD:
           .++ .:/++++++/-.`sss/` BRANCH:
         .:++o: `\++++++++/:---:/- RELEASE: Ubuntu 20.04 LTS
        o:+o+:++. `````'-/ooo+++++\ KERNEL: Linux 4.4.0-18362-Microsoft
       .:+o:+o/. `+sssooo+\ UPTIME: 0d 2h 6m
  .++/+ +oo+o:` \sssooo;
 /+++//+: oo+o
 \+/+o+++ o++o ydddhh+
  .++.o+ +oo+:` /dddhhh;
       .+.o+oo:. oddhhhh+
        \+.++o+o` -,,,,.:ohdhhhhh+
         `:o+++ ohhhhhhhhyo++os:
           .o: .syhhhhhhh'.oo++o.
               /osyyyyyyy.oooo+++\
                   ````` +oo+++o:/
                          `oo++'`

After :

echo $PATH
/snap/bin:/snap/sbin:/mnt/c/windows/system32/:/home/rafaeldtinoco/work/sources/upstream/ubuntu-dev-tools/:/usr/lib/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/home/rafaeldtinoco/work/sources/bzr/ubuntu-archive-tools:/home/rafaeldtinoco/work/sources/upstream/lxd/bin:.

$ wslfetch

                          ./+o+- Windows 10 Linux Subsystem
                  yyyyy. 'yyyyyy+ rafaeldtinoco@lenovo
              .;//+/////h yyyyyyo BUILD: 18363
           .++ .:/++++++/-.`sss/` BRANCH: 19h1_release
         .:++o: `\++++++++/:---:/- RELEASE: Ubuntu 20.04 LTS
        o:+o+:++. `````'-/ooo+++++\ KERNEL: Linux 4.4.0-18362-Microsoft
       .:+o:+o/. `+sssooo+\ UPTIME: 0d 2h 19m
  .++/+ +oo+o:` \sssooo;
 /+++//+: oo+o
 \+/+o+++ o++o ydddhh+
  .++.o+ +oo+:` /dddhhh;
       .+.o+oo:. oddhhhh+
        \+.++o+o` -,,,,.:ohdhhhhh+
         `:o+++ ohhhhhhhhyo++os:
           .o: .syhhhhhhh'.oo++o.
               /osyyyyyyy.oooo+++\
                   ````` +oo+++o:/
                          `oo++'`

Related branches

Patrick Wu (callmepk) wrote :

Thanks for the report. Just checked the code and there is indeed an issue.

Changed in wslu (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Patrick Wu (callmepk)
Patrick Wu (callmepk) wrote :

Also unable to reproduce the `/usr/bin/wslsys: line 1xx: /mnt/c/Windows/System32/reg.exe: Permission denied` bug. Could you show your `/etc/wsl.conf` file? Thanks!

Patrick Wu (callmepk) on 2020-05-06
Changed in wslu (Ubuntu Focal):
status: New → Confirmed
Changed in wslu (Ubuntu Bionic):
status: New → Confirmed
Changed in wslu (Ubuntu Xenial):
status: New → Confirmed
importance: Undecided → High
Changed in wslu (Ubuntu Bionic):
importance: Undecided → High
Changed in wslu (Ubuntu Focal):
importance: Undecided → High
Changed in wslu (Ubuntu Xenial):
assignee: nobody → Patrick Wu (callmepk)
Changed in wslu (Ubuntu Focal):
assignee: nobody → Patrick Wu (callmepk)
Changed in wslu (Ubuntu Bionic):
assignee: nobody → Patrick Wu (callmepk)
Patrick Wu (callmepk) wrote :
Patrick Wu (callmepk) wrote :

Hi Rafael, I am still unable to reproduce the `/usr/bin/wslsys: line 1xx: /mnt/c/Windows/System32/reg.exe: Permission denied` bug. Could you show your `/etc/wsl.conf` file? Otherwise I cannot get all the information I need to fix this bug. Thanks!

Hello Patrick,

Turns out my image was a Bionic one and I kept upgrading until Focal.. I have exported and imported from WSL1 a few times. I have no /etc/wsl.conf :\

Hope that helps =) Feel free to mark this bug incomplete if you think it was something on my side, was trying to leverage what happened to me (and document to others) more than anything.

Thanks for the attention!

Patrick Wu (callmepk) wrote :

Hi Rafael, can you still preproduce the issue of "/usr/bin/wslsys: line 1xx: /mnt/c/Windows/System32/reg.exe: Permission denied"? Further testing with your environment is not helping. Just trying to confirm the `permission denied` part, `command not found` is confirmed to be a part of the bug.

root@lenovo:~$ wslsys
/usr/bin/wslsys: line 108: reg.exe: command not found
Release Install Date: 0x5e72d127
Branch: 19h1_release
Build: 18363
Full Build: 18362.1.amd64fre.19h1_release.190318-1202
Uptime: 0d 0h 2m
Linux Release: Ubuntu 20.04 LTS
Linux Kernel: Linux 4.4.0-18362-Microsoft
Packages Count: 1342

I just have command not found now.

root@lenovo:~$ wslfetch
/usr/bin/wslfetch: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found
/usr/bin/wslsys: line 108: reg.exe: command not found

                          ./+o+- Windows 10 Linux Subsystem
                  yyyyy. 'yyyyyy+ root@lenovo
              .;//+/////h yyyyyyo BUILD: 18363
           .++ .:/++++++/-.`sss/` BRANCH: 19h1_release
         .:++o: `\++++++++/:---:/- RELEASE: Ubuntu 20.04 LTS
        o:+o+:++. `````'-/ooo+++++\ KERNEL: Linux 4.4.0-18362-Microsoft
       .:+o:+o/. `+sssooo+\ UPTIME: 0d 0h 3m
  .++/+ +oo+o:` \sssooo;
 /+++//+: oo+o
 \+/+o+++ o++o ydddhh+
  .++.o+ +oo+:` /dddhhh;
       .+.o+oo:. oddhhhh+
        \+.++o+o` -,,,,.:ohdhhhhh+
         `:o+++ ohhhhhhhhyo++os:
           .o: .syhhhhhhh'.oo++o.
               /osyyyyyyy.oooo+++\
                   ````` +oo+++o:/
                          `oo++'`

Patrick Wu (callmepk) wrote :

Thank you for the confirmation. I will try to push the fix now.

Changed in wslu (Ubuntu Groovy):
status: Confirmed → In Progress
Patrick Wu (callmepk) on 2020-05-27
description: updated
Patrick Wu (callmepk) on 2020-05-29
Changed in wslu (Ubuntu Groovy):
status: In Progress → Fix Committed
Patrick Wu (callmepk) on 2020-06-17
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wslu - 2.3.6-0ubuntu3

---------------
wslu (2.3.6-0ubuntu3) groovy; urgency=medium

  * debian/rules:
    - update the svg conversion commands for the current inkscape
      version and fix the build

 -- Patrick Wu <email address hidden> Wed, 01 Jul 2020 16:07:10 +0200

Changed in wslu (Ubuntu Groovy):
status: Fix Committed → Fix Released
Sean Fausett (openfool) wrote :

Will this fix be released for versions of Ubuntu other than Groovy?

Patrick Wu (callmepk) wrote :

Hi Sean,

It will. It usually takes 2-3 weeks to complete the SRU (StableReleaseUpdates) process

Hello Rafael, or anyone else affected,

Accepted wslu into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/wslu/2.3.6-0ubuntu2~20.04.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in wslu (Ubuntu Focal):
status: Confirmed → Fix Committed
tags: added: verification-needed verification-needed-focal
Patrick Wu (callmepk) wrote :

Tested 2.3.6-0ubuntu2~20.04.0 on focal. As the screenshot is shown, the error is now gone if Windows Path is not included in the PATH.

Patrick Wu (callmepk) wrote :

Tested 2.3.6-0ubuntu2~20.04.0 on focal. As the screenshot is shown, the error is now gone if Windows Path is not included in the PATH.

tags: added: verification-done-focal
removed: verification-needed-focal
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wslu - 2.3.6-0ubuntu2~20.04.0

---------------
wslu (2.3.6-0ubuntu2~20.04.0) focal; urgency=medium

  * d/p/0011-src-wslu-header-reg.exe-path-not-properly-set.patch:
    - reg.exe path not properly set (LP: #1877016)
  * d/p/0012-src-wslfetch.sh-update-Ubuntu-logo.patch:
    - update Ubuntu logo (LP: #1883920)
  * d/p/0013-src-wslu-header-fix-an-issue-that-Ubuntu-will-not-be.patch:
    - fix an issue that Ubuntu will not be detected properly (LP: #1883924)

 -- Patrick Wu <email address hidden> Wed, 17 Jun 2020 21:11:36 +0800

Changed in wslu (Ubuntu Focal):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for wslu has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.