Create multiple jails by copying

From: Siddhartha Jain (
Date: 08/14/04

  • Next message: Lowell Gilbert: "Re: /etc/make.conf"
    Date: Sat, 14 Aug 2004 19:47:52 +0530

    Hash: SHA1


    I created one jail in FreeBSD 4.10. Since the compile time for make
    world and make distribution is too high, I copied the contents of jail1
    to jail2 this way:

    jailbsd:/jails/jail1# find . | cpio -pdmv /jails/jail2

    jail1 is functional. Now, when I run:

    # mount -t procfs proc /jails/jail2/proc
    (No complaints/errors)

    #jail /jails/jail2 jail2 /bin/sh /etc/rc

    I get an error from sendmail-client, sshd, cron, sendmail cannot
    chdir(/var/spool/clientmqueue/): Permission denied
    Program mode requires special privileges, eg., root or TrustedUser

    But "ps ax" reveals that in the jail:
    syslogd, sshd, cron are running but sshd kicks out the user after
    entering username/password.

    What do I need to modify in jail2 to make it work? I am guessing its
    some file permissions?



    Version: GnuPG v1.2.1 (MingW32)
    Comment: Using GnuPG with Thunderbird -

    -----END PGP SIGNATURE-----
    _______________________________________________ mailing list
    To unsubscribe, send any mail to ""

  • Next message: Lowell Gilbert: "Re: /etc/make.conf"

    Relevant Pages

    • Creating multiple jails by copying
      ... I created one jail in FreeBSD 4.10. ... jail1 is functional. ... I get an error from sendmail-client, sshd, cron, sendmail cannot ...
    • [Full-disclosure] (no subject)
      ... oh so your paper rox better than all paper about chrooting sshd? ... Sometimes it may become profitable or necessary to jail the ssh daemon ... This paper will show you how to successfully jail sshd itself. ...
    • Re: Jail crontab crashing?
      ... I've found the actual line from which the cron was crashing. ... I agree that it's stupid ti call this command when in jail, because jail don't have perms to touch system time, ... and immediately after that the cron dies with a core (core file is in /var/cron/cron.core), ...
    • Re: Cant run whoami(id -un) inside chroot jail using openssh native jail support
      ... I have successfully setup a chroot jail using openssh's new native ... such as ld -un whoami logname. ... Comment: Using GnuPG with Mozilla - ... Filtered by: TRUSTEM.COM's Email Filtering Service ...
    • Re: Fwd: Static Routes, gateways and the end of my sanity
      ... -}The scenario is that I have a server here with twin nics, bce0 and bce1; ... sshd is running inside the jail;). ... parent's sshd_config needs to say "ListenAddress". ...