jailkit-users
[Top][All Lists]
Advanced

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

[Jailkit-users] issue with jk_jailuser on Mandriva 2006


From: Steve Wegner
Subject: [Jailkit-users] issue with jk_jailuser on Mandriva 2006
Date: Tue, 24 Oct 2006 17:34:52 -0500

Trying to get Jail kit sftp scp only to work. 
 
My user is test, my jail is /var/sftproot
 
When I run jk_jailuser I get:
 
# jk_jailuser -m -j /var/sftproot test
Traceback (most recent call last):
  File "/usr/sbin/jk_jailuser", line 297, in ?
    main()
  File "/usr/sbin/jk_jailuser", line 288, in main
    jailuser(jail, username, movehome, config)
  File "/usr/sbin/jk_jailuser", line 177, in jailuser
    shutil.copy(oldhome, newhome)
  File "/usr/lib/python2.4/shutil.py", line 81, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.4/shutil.py", line 47, in copyfile
    fsrc = open(src, 'rb')
IOError: [Errno 21] Is a directory
 
BUT log file says:
 
Oct 24 22:14:27 hostname usermod[3221]: change user `test' home from
`/home/test' to `/var/sftproot/./home/test'
Oct 24 22:14:27 hostname usermod[3221]: change user `test' shell from
`/bin/sh' to `/usr/sbin/jk_chrootsh'

So did it really work?

No the test directory did not get moved into the jail
But I did get:

/etc/passwd:

test:x:512:100:test:/var/sftproot/./home/test:/usr/sbin/jk_chrootsh

And :

test:x:512:100:test:/home/test:/usr/sbin/jk_lsh

 
So I did go ahead and move the test home directory to the jail
(/var/sftproot)so now I have:

/var/sftproot/home/test

 
When I do it this way I try to sftp and my connection appears succsesful
but closes connection right away. Log file says: 

Oct 24 22:32:40 hostname sshd[3546]: Accepted password for test from
10.11.12.13 port 8281 ssh2
Oct 24 22:32:40 hostname sshd[3548]: subsystem request for sftp
Oct 24 22:32:40 hostname jk_chrootsh[3549]: now entering jail
/var/sftproot for user test (512)
Oct 24 22:32:40 hostname jk_lsh[3549]: jk_lsh version 2.1, started
Oct 24 22:32:40 hostname jk_lsh[3549]: executing command
'/usr/lib/ssh/sftp-server' for user test (512)

That's as far as I can get.

Thanks!

Steve
 





reply via email to

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