jailkit-users
[Top][All Lists]
Advanced

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

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


From: . .
Subject: [Jailkit-users] sftp/scp jailkit setup on OpenBSD 4.1
Date: Tue, 10 Jul 2007 23:46:36 -0600

O/S: OpenBSD 4.1
JailKit: jailkit-2.3
Home: /sftp

Instructions: http://olivier.sessink.nl/jailkit/howtos_sftp_scp_only.html

I was following the instructions for setting up jailkit for sftp/scp according to the above instructions.

1) Everything was going fine until this step:

jk_jailuser -m -j /home/jail mike

At that point I received the following error:

# 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

2) Initially I was getting this error:
Jul 10 15:41:44 sftp sshd[31404]: Accepted password for mike from 192.168.123.100 port 1528 ssh2
Jul 10 15:41:44 sftp sshd[24759]: subsystem request for sftp

I believe I fixed it by creating a /sftp/home/mike directory as user 'mike' and group 'user'.

3) Then I tried again and received this:
Jul 10 16:33:30 sftp sshd[27567]: Accepted password for mike from ::1 port 4192 ssh2
Jul 10 16:33:30 sftp sshd[28069]: subsystem request for sftp
Jul 10 16:33:30 sftp jk_chrootsh[6154]: now entering jail /sftp for user mike (1002)
Jul 10 22:33:30 sftp jk_lsh[6154]: jk_lsh version 2.3, started
Jul 10 22:33:30 sftp jk_lsh[6154]: WARNING: user mike (1002) tried to run '/usr/libexec/sftp-server', which is not allowed according to /etc/jailkit/jk_lsh.ini

4) So I modified the /etc/jailkit/jk_lsh.ini and /sftp/etc/jailkit/jk_lsh.ini to add /usr/libexec/sftp-server
Then I received this:
Jul 10 16:38:52 sftp sshd[11660]: Accepted password for mike from ::1 port 48980 ssh2
Jul 10 16:38:52 sftp sshd[4143]: subsystem request for sftp
Jul 10 16:38:52 sftp jk_chrootsh[19000]: now entering jail /sftp for user mike (1002)
Jul 10 22:38:52 sftp jk_lsh[19000]: jk_lsh version 2.3, started
Jul 10 22:38:52 sftp jk_lsh[19000]: executing command '/usr/libexec/sftp-server' for user mike (1002) Jul 10 22:38:52 sftp jk_lsh[19000]: WARNING: running /usr/libexec/sftp-server failed for user mike (1002): Unknown error: -1 Jul 10 22:38:52 sftp jk_lsh[19000]: WARNING: check the permissions and libraries for /usr/libexec/sftp-server Jul 10 16:50:05 sftp sshd[1236]: Accepted password for root from 192.168.123.100 port 1873 ssh2
Jul 10 16:50:05 sftp sshd[1236]: subsystem request for sftp

For the moment I'm stuck here... any suggestions? Also, is there anything I can do to help debug the original jk_jailuser error?

_________________________________________________________________
Fight Allergies With Live Search http://search.live.com/results.aspx?q=Remedies+For+Spring+Allergies&mkt=en-ca&FORM=SERNEP





reply via email to

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