jailkit-users
[Top][All Lists]
Advanced

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

[Jailkit-users] scp problem with jailkit


From: Johan Söderberg
Subject: [Jailkit-users] scp problem with jailkit
Date: Mon, 7 Mar 2016 14:10:11 +0000

Hi,

I hope someone can help me understand what's going on as I'm not sure where to start troubleshooting. I have a situation where I've created a jail wich contains a few users who belongs to either of two groups. The setup looks like this:

mkdir -p /opt/jails/jail1

groupadd -g 7000 grp1
groupadd -g 7001 grp2

useradd -g grp1 -u 7000 tstusr1
useradd -g grp2 -u 7001 tstusr2

passwd tstusr1
passwd tstusr2

jk_init -j /opt/jails/jail1 scp sftp jk_lsh
jk_jailuser -m -j /opt/jails/jail1 tstusr1
jk_jailuser -m -j /opt/jails/jail1 tstusr2

vi /opt/jails/jail1/etc/jailkit/jk_lsh.ini
[group grp1]
paths= /usr/bin, /usr/lib/
executables= /usr/bin/scp, /usr/libexec/openssh/sftp-server

[group grp2]
paths= /usr/bin, /usr/lib/
executables= /usr/bin/scp, /usr/libexec/openssh/sftp-server

mkdir /opt/jails/jail1/home/tstusr1/testdir
touch /opt/jails/jail1/home/tstusr1/testdir/{testfile1.txt,testfile2.txt,testfile3.txt}
chown -R tstusr1:grp1 /opt/jails/jail1/home/tstusr1/testdir

mkdir /opt/jails/jail1/home/tstusr2/testdir
touch /opt/jails/jail1/home/tstusr2/testdir/{testfile1.txt,testfile2.txt,testfile3.txt}
chown -R tstusr2:grp2 /opt/jails/jail1/home/tstusr2/testdir

When users who belong to group grp2 run scp with a wild card they get the following error:
scp address@hidden:testdir/* .
address@hidden's password: 
scp: testdir/*: No such file or directory

However the directory exists and contains files:
scp address@hidden:testdir/testfile2.txt .
address@hidden's password: 
testfile2.txt                                                                          100%    0     0.0KB/s   00:00

The users who belong to group grp1 does not have the problem:
scp address@hidden:testdir/* .
address@hidden's password: 
testfile1.txt                                                                          100%    0     0.0KB/s   00:00    
testfile2.txt                                                                          100%    0     0.0KB/s   00:00    
testfile3.txt                                                                          100%    0     0.0KB/s   00:00

When I move the users, who have the problem, out of the jail scp work fine. The problem is seen on RHEL 6.7, jailkit 2.17 and openssh 5.3p1-112. It always seem to be the users who belong to the second created group that gets the problem. Any ideas where the problem might lie? OS? Openssh? Jailkit? ...?

Thanks in advance,


/Johan Söderberg


reply via email to

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