Find the answer to your Linux question:
Results 1 to 4 of 4
HiI was wondering if any can help, I just cant seem to get man commanf to work properly within a chroot (im using jailkit), the command works but it does ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    4

    man pages blank in chroot


    HiI was wondering if any can help, I just cant seem to get man commanf to work properly within a chroot (im using jailkit), the command works but it does not pull any information.. I tried debugging using strace and i get the following result from strace on the chrooted man command and normal enviroment

    I believe all the libaries are installed as it is loading fine just not pulling the info through


    Jailkit


    open("/etc/ld.so.cache", O_RDONLY) = 4
    open("/lib/libc.so.6", O_RDONLY) = 4
    open("/etc/man.config", O_RDONLY) = 4
    open("/usr/share/locale/C/man", O_RDONLY) = 5

    Process 26204 detached
    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    nan 0.000000 0 4 read
    nan 0.000000 0 1 write
    nan 0.000000 0 4 open
    nan 0.000000 0 3 close
    nan 0.000000 0 1 execve
    nan 0.000000 0 1 1 access
    nan 0.000000 0 4 brk
    nan 0.000000 0 3 ioctl
    nan 0.000000 0 6 old_mmap
    nan 0.000000 0 1 munmap
    nan 0.000000 0 2 mprotect
    nan 0.000000 0 2 mmap2
    nan 0.000000 0 4 fstat64
    nan 0.000000 0 1 getuid32
    nan 0.000000 0 1 getgid32
    nan 0.000000 0 1 geteuid32
    nan 0.000000 0 1 getegid32
    nan 0.000000 0 1 set_thread_area
    ------ ----------- ----------- --------- --------- ----------------
    100.00 0.000000 41 1 total







    real life

    open("/etc/ld.so.cache", O_RDONLY) = 3
    open("/lib/libc.so.6", O_RDONLY) = 3
    open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
    open("/etc/man.config", O_RDONLY) = 3
    open("/usr/share/locale/en/man", O_RDONLY) = 4


    % time seconds usecs/call calls errors syscall
    ------ ----------- ----------- --------- --------- ----------------
    nan 0.000000 0 4 read
    nan 0.000000 0 1 write
    nan 0.000000 0 7 2 open
    nan 0.000000 0 4 close
    nan 0.000000 0 1 execve
    nan 0.000000 0 1 1 access
    nan 0.000000 0 4 brk
    nan 0.000000 0 3 ioctl
    nan 0.000000 0 6 old_mmap
    nan 0.000000 0 1 munmap
    nan 0.000000 0 2 mprotect
    nan 0.000000 0 3 mmap2
    nan 0.000000 0 5 fstat64
    nan 0.000000 0 1 getuid32
    nan 0.000000 0 1 getgid32
    nan 0.000000 0 1 geteuid32
    nan 0.000000 0 1 getegid32
    nan 0.000000 0 1 set_thread_area

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,429
    Well thats since the man pages are in a Directory that you havnt Chrooted.
    I am not known how it works with Jailkit. I use Chroot+mount-bind+ln but. then I can run man and have blank pages. Since I dont have the dir were the Pages are.
    I dont know were they are. Since I just use the man page on the net then
    Hope that helped.
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    4
    Are the man pages ie for ls "ls.1.qz? in a directory /usr/share/man/man1/l

    As i thought the same the man pages may not be there but i think they are.. as they are full of command files that are gzip.. i then did a strace and the chroot account.. and i noticed it returned a access("/usr/share/man/man/man1/ls.1.gz so i un zipped the file

    and ran a strace again... and seem to indicate the file was found and opened but it still returned a blank page


    access("/usr/share/man/man/man1/ls.1.gz", R_OK) = 0
    access("/usr/share/man/man1/ls.1", R_OK) = 0
    open("/usr/share/man/man1/ls.1", O_RDONLY) = 5
    open("/usr/share/man/man1/ls.1", O_RDONLY) = 5

    Any ideas?

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2012
    Posts
    4
    I have exactly the same issue.
    Did you find any answers?

    Is there any specific permissions to give to the man page? or to man a+s for ex.

    Hope to get a reply asap, coz it is quite blocking for me.

    Thanks a lot.
    Fred.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •