jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Jailkit-users] sftp/scp jailkit setup on OpenBSD 4.1


From: . .
Subject: Re: [Jailkit-users] sftp/scp jailkit setup on OpenBSD 4.1
Date: Wed, 11 Jul 2007 12:20:00 -0600

> . . wrote:

>> # jk_jailuser -m -j /sftp/ mike
>> Traceback (most recent call last):
>>  File "/usr/sbin/jk_jailuser", line 300, in <module>
>>    main()
>>  File "/usr/sbin/jk_jailuser", line 291, in main
>>    jailuser(jail, username, movehome, config)
>>  File "/usr/sbin/jk_jailuser", line 180, in jailuser
>>    shutil.copy(oldhome, newhome)
>>  File "/usr/local/lib/python2.5/shutil.py", line 80, in copy
>>    copyfile(src, dst)
>>  File "/usr/local/lib/python2.5/shutil.py", line 46, in copyfile
>>    fsrc = open(src, 'rb')
>> IOError: [Errno 21] Is a directory

it seems that I fixed this already. Can you try the prerelease on
http://olivier.sessink.nl/jailkit/jailkit-cvs-2007-07-10.tar.gz and see if
the problem is solved?


I deleted all the old jailkit files and installed the release above. I didn't get the same error message but I didn't get a home directory either.

bash-3.2# jk_init -v /sftp/ sftp scp
Source file(s) /lib/libnss_dns.so.2 do not exist
Source file(s) /lib64/libnss_dns.so.2 do not exist
Creating directory /sftp/etc
Copying /etc/resolv.conf to /sftp/etc/resolv.conf
Source file(s) /etc/host.conf do not exist
Copying /etc/hosts to /sftp/etc/hosts
Copying /etc/protocols to /sftp/etc/protocols
Source file(s) /lib/libnsl.so.1 do not exist
Source file(s) /lib/libnss*.so.2 do not exist
Source file(s) /lib64/libnss*.so.2 do not exist
Source file(s) /etc/nsswitch.conf do not exist
Source file(s) /usr/lib/sftp-server do not exist
Source file(s) /usr/libexec/openssh/sftp-server do not exist
Source file(s) /usr/lib/misc/sftp-server do not exist
Creating directory /sftp/usr
Creating directory /sftp/usr/libexec
Copying /usr/libexec/sftp-server to /sftp/usr/libexec/sftp-server
/sftp/usr/libexec/sftp-server already exists, will not touch it
Creating directory /sftp/usr/lib
Copying /usr/lib/libc.so.40.3 to /sftp/usr/lib/libc.so.40.3
Copying /usr/libexec/ld.so to /sftp/usr/libexec/ld.so
Creating directory /sftp/dev
Creating device /sftp/dev/urandom
Creating device /sftp/dev/null
Creating directory /sftp/usr/bin
Copying /usr/bin/scp to /sftp/usr/bin/scp
bash-3.2# jk_init -v /sftp/ jk_lsh
Source file(s) /lib/libnsl.so.1 do not exist
Source file(s) /lib/libnss*.so.2 do not exist
Source file(s) /lib64/libnss*.so.2 do not exist
Source file(s) /etc/nsswitch.conf do not exist
Creating directory /sftp/usr/sbin
Copying /usr/sbin/jk_lsh to /sftp/usr/sbin/jk_lsh
/sftp/usr/sbin/jk_lsh already exists, will not touch it
/sftp/usr/lib/libc.so.40.3 already exists, will not touch it
/sftp/usr/libexec/ld.so already exists, will not touch it
Creating directory /sftp/etc/jailkit
Copying /etc/jailkit/jk_lsh.ini to /sftp/etc/jailkit/jk_lsh.ini
bash-3.2# jk_jailuser -m -j /sftp/ mike
home directory /sftp/./home/mike is already inside the jail
bash-3.2# cd /sftp/
bash-3.2# ls
dev etc usr
bash-3.2# jk_jailuser -m -j /sftp mike
home directory /sftp/./home/mike is already inside the jail
bash-3.2# cd /sftp/./home/mike
bash: cd: /sftp/./home/mike: No such file or directory
bash-3.2#

/var/log/authlog:
Jul 11 05:14:09 sftp sshd[4233]: Accepted password for mike from ::1 port 15048 ssh2
Jul 11 05:14:09 sftp sshd[30132]: subsystem request for sftp
Jul 11 05:14:09 sftp jk_chrootsh[11451]: abort, path /sftp/./home/mike is not a directory

So I just made a home directory for mike and set the owner to mike and the group to 'users'.

Now I get this:
Connecting to xxx.xxx.xxx.xxx...
address@hidden's password:
Connection closed

/var/log/authlog
Jul 11 05:29:57 sftp sshd[10902]: Accepted password for mike from xxx.xxx.xxx.xxx port 32437 ssh2
Jul 11 05:29:57 sftp sshd[32100]: subsystem request for sftp
Jul 11 05:29:57 sftp jk_chrootsh[24851]: now entering jail /sftp for user mike (1002)
Jul 11 11:29:57 sftp jk_lsh[24851]: jk_lsh version 2.3, started
Jul 11 11:29:57 sftp jk_lsh[24851]: executing command '/usr/libexec/sftp-server' for user mike (1002)

_________________________________________________________________
Tell us your tech love story in the Summer Lovin Competition for your chance to win laptop loaded with Windows Vista, Office 2007 and Windows Live OneCare. http://www.microsoft.com/canada/home/contests/summerlovin/default.aspx





reply via email to

[Prev in Thread] Current Thread [Next in Thread]