Find the answer to your Linux question:
Results 1 to 7 of 7
Hi ... I was interested in making the Jail work and now I have it working ... .But some features I couldnt install .... like the man pages... i had ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    3

    Question including features in Jail environment


    Hi ...
    I was interested in making the Jail work and now I have it working ... .But some features I couldnt install .... like the man pages... i had copied all the man folders and the man command to jail user.... still its giving an error execve : no such file or directory ...
    Other commands are working fine and so is the VI editor... i am not able to find any reference to this in google... if some one knows , do help me out ...
    Thanks in advance

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    execve is a unix function in unistd.h. Don't know much about jails so IDK if it's considered secure to have this function implemented in a chroot environment.

  3. #3
    Just Joined!
    Join Date
    Apr 2007
    Posts
    3

    execve shouldnt have a problem in jail

    its the execve that executes all other commands ... when others are working , i am not able to understand why man shouldnt work .
    Let me add on to my problem statement ...
    when i log in as a jail user thru the GUI, i am able to see the original root directory and other users , which i am not able to in terminal or console . How do i prevent the jailuser to go to the root in the GUI?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    O I think that error is saying execve couldn't find its argument. Disregard the previous. Well when a user logs in it's just looking at /etc/passwd on your real root and running /bin/bash as their shell. You probably need to either run a script that starts a chroot bash or have some kind of a login wrapper... I've never done this so I am just speculating. Check out this site I came across on a quick google search.

    http://kegel.com/crosstool/current/d...gin-howto.html

  6. #5
    Just Joined!
    Join Date
    Apr 2007
    Posts
    3
    yeah ... as i said... i have my jail working ... i have done all the instructions for that... i am not able to make man work .. thats my problem .

  7. #6
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    I know, I was responding to the login issue via GUI... but the man issue has to do with something that man is trying to execute, like maybe the pager. Is it only when you try to actually VIEW a man page? Like does man -k command work?

  8. #7
    Just Joined!
    Join Date
    Aug 2008
    Posts
    1
    Hi All, I also had a lot of problems activating man pages in a chroot environment. It turned out to be a matter of copying a set of commands and configuration files to the chroot environment. Say your jail is in home jail. Then copy the following list of files and commands (including their libs, use ldd):
    • /etc/sysconfig/i18n
    • /bin/gzip
    • /bin/gunzip
    • /usr/bin/gzip
    • /usr/bin/gunzip
    • /usr/bin/iconv
    • /usr/bin/groff
    • /usr/bin/less
    • /usr/bin/nroff
    • /usr/bin/troff
    • /usr/bin/grbl
    • /bin/unicode_start
    • /usr/bin/man


    The list above might not be complete! The recipe I used to find out all the details, is running "strace -o tmp -f man man". It shows which programs are execed and which files and libraries are opend. To complete the exercise I analyzed with "ps -efH | grep man" how the man command works. This way I found out, for example, that GNU troff is needed. The whole exercise took me a couple of hours. It turned out to be doable, but not easy.

    Furthermore, on my Linux distribution, Fedora 8, I also had to copy /etc/profile.d and settings like /etc/bashrc.

    I hope that the above gives some clues to make man work in a chroot environment. Good luck!

Posting Permissions

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