This repository was archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
This repository was archived by the owner on Jul 11, 2023. It is now read-only.
userid in NiChrome does not match with userid of the build machine, leading to permission denied error #65
Copy link
Copy link
Open
Description
Commit id: 511cf6f
Build Machine Configurations:
- go toolchain version: go1.9.3 linux/amd64
- umask: 0022
- Perimission bits of ./usr/lib, ./usr/lib/[any_binary], ./lib, ./lib/[any_binary] in the NiChrome directory: 755
Steps for reproduction:
- Plug in the usb stick into build machine and find out what device it is (in this case, it was /dev/sda)
- From the project root directory, go to the usb subdirectory and build the usb command in this directory
$ cd usb && go build .
- Install the u-root's command gpt. Change back to the root directory. Run the usb command.
$ go install github.com/u-root/u-root/cmds/gpt
$ cd ..
$ ./usb/usb -fetch=true -dev=/the/name/of/device
- Unplug the usb stick from build machine and plug it into a Chromebook
- Turn on a Chromebook. When the dev-mode screen appears, press
Ctrl-U - After boot, observe that Chrome browser and user terminal do not start.
Ctrl-Alt-backspaceto exit X11- Notice the following error message about permission denied error:
X11 user startup: fork/exec /bbin/uinit: permission denied
The following are results of some further investigation after the above reproduction steps:
-
ls -a -l /in the test Chromebook show that /, /go, /lib, /tcz, /usr owned by the user who built the usb stick on the build machine (in this case, userid: 533858, groupid: 5762). Furthermore, the permission on / is 700 -
When I did
chmod 755 /as a root and ranuinit -login, I got the following output:
Welcome to NiChrome!
Welcome to NiChrome!
Starting up user mode processes
Run wingo
Run flwm
Run AppChrome
Run chrome
aterm: can't open display :0
x11 user failed: X11 start /usr/local/bin/aterm []: exit startus 1
X11 user startup: exit status 1
wait: exit status 1
installcommand: trying to build {cmdName: wingo, Path [$PATH], err exit status 1, out can't load package: package github.com/u-root/wingo: open /src/github.com/u-root/wingo/cmd_hacks.go: permission denied }
-
Upon entering
ls -a -l /src/github.com/u-root/wingo, I found cmd_hacks.go and a lot other .go files all have permission 640 -
Upon changing the permissions in all the files in the /src/github.com/u-root/wingo directory tree to 755, running
uinit -loginagain generated the following message:
Welcome to NiChrome!
Welcome to NiChrome!
Starting up user mode processes
Run wingo
Run flwm
Run AppChrome
Run chrome
aterm: can't open display :0
x11 user failed: X11 start /usr/local/bin/aterm []: exit startus 1
X11 user startup: exit status 1
wait: exit status 1
Cannot mount AppImage, please check your FUSE setup.
You might still be able to extract the contents of this AppImage
If you it with the --appimage-extract option.
See https://github.com/AppImage/AppImageKit/wiki/FUSE
for more information
Failed to open libnotify
open dir error: No such file or directory
installcommand: trying to build {cmdName: wingo, Path [$PATH], err exit status 1, out go install github.com/u-root/wingo/vendeor/github.com/BurntSushi/xgbutil/xrect: mkdir /pkg/linux_amd64/github.com/u-root/wingo: permission denied
go install go/token: mkdir go/pkg/linux_amd64/go/: permission denied
go install go install github.com/u-root/wingo/vendeor/github.com/BurntSushi/xgbutil/xrect: mkdir go/pkg/linux_amd64/go/: permission denied
[more go install permission denied error]
}
- Upon making everything in the /go and /pkg directory tree 777, run
uinit -loginagain, generate the following message:
Welcome to NiChrome!
Welcome to NiChrome!
Starting up user mode processes
Run wingo
Run flwm
Run AppChrome
Run chrome
aterm: can't open display :0
x11 user failed: X11 start /usr/local/bin/aterm []: exit startus 1
X11 user startup: exit status 1
wait: exit status 1
installcommand: trying to build {cmdName: wingo, Path [$PATH], err exit status 1, out go install github.com/u-root/wingo: open /ubin/wingo: permission denied
- Upon going into /ubin, there was no binary called wingo. However typing wingo onto the terminal would generate a response and wingo appears in /ubin. Now running the
uinit -loginwill not generate the installcommand error anymore.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels