Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-27-2006, 09:07 AM
|
#1
|
LQ Newbie
Registered: Mar 2006
Location: Valhalla
Distribution: fedora core 4
Posts: 3
Rep:
|
Jailkit Problems
What I'm trying to do is chroot an sftp account and I can't seem to get it to work properly. My setup of the account is as follows.
/var/www/html/jail is my jail root and it has the following directories in it dev,etc,home,lib,usr,var xlan
The users jail area is /var/ww/html/jail/xlan
my /etc/passwd looks like.
jake6937:x:504:504::/var/www/html/jail/./xlan:/usr/sbin/jk_chrootsh
my /var/www/html/jail/etc/passwd looks like
root:x:0:0:root:/root:/bin/bash
jake6937:x:504:504::/xlan:/usr/sbin/jk_lsh
The service is running:
nobody 20458 0.0 0.0 1664 188 ? Ss Mar24 0:00 /usr/sbin/jk_so
But I get this error message when I try to connect
Mar 27 08:06:41 localhost sshd(pam_unix)[2724]: session opened for user jake6937 by (uid=0)
Mar 27 08:06:41 localhost jk_chrootsh[2725]: abort, path /var/www/html/jail/./xlan does not have group 504
Mar 27 08:06:41 localhost sshd(pam_unix)[2724]: session closed for user jake6937
At this point any comments or suggestions would be greatly appreciated.
|
|
|
03-28-2006, 05:19 AM
|
#2
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
Quote:
path /var/www/html/jail/./xlan does not have group 504
|
Can you do an "ls -l -d /var/www/html/jail/./xlan"?
Are you sure user jake6937 has access (at least execute) to all directories leading up to /var/www/html/jail/./xlan?
|
|
|
03-30-2006, 02:35 PM
|
#3
|
LQ Newbie
Registered: Mar 2006
Location: Valhalla
Distribution: fedora core 4
Posts: 3
Original Poster
Rep:
|
I figured it out. I just had to to a chgrp 504 /var/www/html/jail/xlan to get it to work.
I'm comming across another problem now. I'm setting up a jail for a second user, I did the exact same thing but I'm getting this error.
Mar 30 13:18:28 localhost jk_chrootsh[14317]: now entering jail /var/www/html/jail for user cent241 (505)
Mar 30 13:18:28 localhost jk_chrootsh[14317]: abort, groupname cent241 differs from jail groupname cent6938 for group ID 505, check /etc/passwd and /var/www/html/jail/etc/passwd
I checked both those password files and the groupname and id are both cent241 and if: 505. I'm not sure what the problemo is here.
|
|
|
03-31-2006, 01:44 AM
|
#4
|
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515
Rep:
|
Please post all the groups (GID) involved:
-groups from both etc/passwd files and etc/group files
-group ownership of the jail directory
and see where they are inconsistent.
|
|
|
All times are GMT -5. The time now is 10:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|