Hi there!
I'm on section 6.25 - GCC (host is Debian 10) and I'm hitting a permission issue on the make command:
Quote:
su nobody -s /bin/bash -c "PATH=$PATH make -k check"
su: Cannot drop the controlling terminal
|
This is my first time encountering the nobody user and controlling terminal so this is new for me. What I've tried:
a.
Quote:
su nobody -> Cannot execute /bin/false: Permission denied
|
As I understand it, /bin/false comes from coreutils (which is installed in the /tools/bin, but not in /bin yet). So if it has a permission error, is it trying to access /bin/false from the host? is that possible within the chroot environment or am i misunderstanding the error?
b.
Quote:
remove /bin/false from the nobody entry of /etc/passwd
|
- results in the same error from the make command
- su nobody -> Cannot execute /bin/sh: Permission denied
c.
Quote:
add change /bin/false to /tools/bin/false for nobody in /etc/passwd
|
- results in the same error from the make command
- su nobody -> Cannot execute tools/bin/sh: Permission denied
The instructions say that nobody should be an unprivileged user. So it seems as though I need to change permissions on some files here's what I have now:
/bin/sh does exist, as a link to bash, with permissions lrwxrwxrwx.
the permissions of su are -rwsr-xr-x
all commands in /bin are owned by root
maybe the best option is to start Ch6 over. however, even if I will do that, I'm still curious what is the expected behaviour? How does the root hand off the controlling terminal to nobody to execute this command?
I did the mounts and chroot commands as per the instructions at start of Ch6