View previous topic :: View next topic |
Author |
Message |
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Sat Mar 26, 2005 7:44 pm Post subject: [solved] Cannot chroot |
|
|
That's weird. I have a complete working Gentoo system mounted under /new and I want to chroot there:
Code: |
# chroot /new/ /bin/bash
chroot: cannot run command `/bin/bash': Permission denied
# whoami
root |
Code: | -rwxrwxrwx 1 root root 624932 Mar 23 22:04 /new/bin/bash |
Permission denied even if I'm the r00t?!
Note: I'm not installing Gentoo (for Moderators), I just want to chroot:)
Last edited by zieloo on Sun Mar 27, 2005 9:38 am; edited 1 time in total |
|
Back to top |
|
|
tredman2 Apprentice
Joined: 06 Dec 2002 Posts: 169 Location: Holiday, FL
|
Posted: Sat Mar 26, 2005 8:48 pm Post subject: |
|
|
Don't know if it makes any difference, but try it without the trailing slash on /new. _________________ Tim
"I drank what?" - Socrates, 399 BCE |
|
Back to top |
|
|
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Sat Mar 26, 2005 8:58 pm Post subject: |
|
|
I doesn't make any difference, chroot fails with the same message. |
|
Back to top |
|
|
tukachinchila Apprentice
Joined: 11 Mar 2005 Posts: 274 Location: Oregon
|
Posted: Sat Mar 26, 2005 8:59 pm Post subject: |
|
|
Is "/new" mounted "noexec", "nosuid", or "ro"? Can you supply the output of: |
|
Back to top |
|
|
tredman2 Apprentice
Joined: 06 Dec 2002 Posts: 169 Location: Holiday, FL
|
Posted: Sat Mar 26, 2005 8:59 pm Post subject: |
|
|
Are you in /new when you execute the chroot command? _________________ Tim
"I drank what?" - Socrates, 399 BCE |
|
Back to top |
|
|
Nard` Apprentice
Joined: 23 Jan 2005 Posts: 250
|
Posted: Sat Mar 26, 2005 9:03 pm Post subject: |
|
|
hate to state the obvious, but:
can you execute /new/bin/bash normally? (i.e. without trying to chroot)?
if not:
ls -dl /new
Are permissions ok?
ls -dl /new/bin
Same as above, etc. Till you get to the problem
--- Just an idea _________________ Programming is the process of putting bugs in.
Debugging is the process of attempting to take bugs out, doing an ugly hack, hitting your computer, then claiming insurance. |
|
Back to top |
|
|
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Sat Mar 26, 2005 9:54 pm Post subject: |
|
|
Code: | # /new/bin/bash
bash: /new/bin/bash: Permission denied
# ls -dl /new/
drwxr-xr-x 18 root root 4096 Mar 23 17:48 /new/
# ls -dl /new/bin/bash
-rwxrwxrwx 1 root root 624932 Mar 23 22:04 /new/bin/bash
# ls -dl /new/bin/
drwxr-xr-x 2 root root 4096 Mar 24 08:56 /new/bin/ |
And? |
|
Back to top |
|
|
tukachinchila Apprentice
Joined: 11 Mar 2005 Posts: 274 Location: Oregon
|
Posted: Sat Mar 26, 2005 10:26 pm Post subject: |
|
|
What does show you? |
|
Back to top |
|
|
zieloo Veteran
Joined: 28 Mar 2004 Posts: 1337
|
Posted: Sun Mar 27, 2005 9:38 am Post subject: |
|
|
tukachinchila wrote: | Is "/new" mounted "noexec", "nosuid", or "ro"? Can you supply the output of: |
Yes, it was mounted with noexec bit...
Thanks a lot! |
|
Back to top |
|
|
|