HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Jailkit SSH User access to /var/www/domain.com ? (http://www.howtoforge.com/forums/showthread.php?t=56581)

sjau 17th March 2012 11:14

Jailkit SSH User access to /var/www/domain.com ?
 
Hi there

I like SSH access and also use SCP to transfer files usually. So it's good to just have one login but I would like to restrict the user just to /var/www/domain.com.

However I can't seem to get this to work.

In the System Settings -> Server Configuration -> Server -> Jailkit

I did set Jailkit chroot home to '/'

The ssh user has jailkit enabled and under options the folder is set to:

'/var/www/clients/client1/web6'


cat /etc/passwd returns this:

SSHUSER:x:5008:5006::/var/www/clients/client1/web6/./:/usr/sbin/jk_chrootsh

and the actual folder user is:
web6:x:5008:5006::/var/www/clients/client1/web6/./:/bin/bash

However when I try to login, I get:

Mar 17 10:05:22 manager jk_chrootsh[14187]: abort, path /var/www/clients/client1/web6/./ is not owned by 5008

Checking who owns folder 'web6' I get this:

drwxr-xr-x 14 root root 4.0K Mar 17 09:43 web6



So, is there a way to jail a ssh user to the web folder?

till 19th March 2012 09:19

The owner of the web6 directory depends on the security mode that you use on your server. If you set the security mode under System > Server config > web to "high", then the directory will be owned by the web6 user and not root and you can use this as home directory of the jailkit user.

sjau 19th March 2012 09:31

I'll have a look into that. Thanks for the reply.


All times are GMT +2. The time now is 14:09.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.