tags:

views:

163

answers:

2

I recently installed a SSH server on my Windows 7 PC and created a separate user account for this. When i logged in using SSH, i could access all the windows directories.

/cygdrive/c
/cygdrive/d
/cygdrive/e

How do i prevent this user from accessing all the win directories other than its home directory under cygwin /home/chuck/ ?

Preferably i do not want the user to even view /cygdrive when the user types "mount".
Is there a easy way to do this?
I want to later allow remote users to log on to this machine and avoid messing up other things.
I know i can setup a separate machine but this is a plan for later.

A: 

I don't know specifically about Cygwin but in Unix in general you could use the chroot.

Rickard von Essen
Tried that...the user can still see those directories..
mtanish
Try to follow something like:http://www.howtoforge.com/chroot_ssh_sftp_debian_etch
Rickard von Essen
A: 

try changing the group of the ssh_user_name to Guest, then specifically allow rwx perms for the Guest group through the security tab in Windows. I have not tried this before, which I am going to try soon. This should be easier than denying access to each drive by adding the ssh_user_name, which is highly inefficient if you have many drives like I do.

The reason why i chose guest is because by default it is denied all access, which makes it easier to specifically choose which drive you want the ssh_user_name to have access to.

Eric
I tried this and it kinda worked for me initially but later on when i rebooted my PC, all went back to the way it was. And this time when i tried to set the restriction, it was of no use...i could still browse through all the directories...
mtanish