linux – chroot:无法运行命令’/ bin / bash’:权限被拒绝
我正在努力做一个chroot作为某个用户.对于一个用户来说它是有效的,对于其他用户来说它没有,我不知道发生了什么.
我在chroot目录中的/ etc / passwd看起来像这样(相关部分):
test0:x:1000:1000:test0:/home/test:/bin/bash
test1:x:1001:1001:test1:/home/test:/bin/bash
> sudo chroot –userspec = test0 chroot_dir / / bin / bash –login效果很好> sudo chroot –userspec = test1 chroot_dir / / bin / bash –login说chroot:无法运行命令’/ bin / bash’:权限被拒绝> / bin / bash in chroot的详细信息:-rwxr-xr-x 1 user user 455188 Sep 19 08:58,其中user是我在系统中的用户名.
任何想法为什么用户test1不起作用?如果您需要更多信息,请询问,我会把它们放进去.非常感谢您提前.