Take the 2-minute tour ×

I have installed SFTP on a windows servers using copSSH and all is good and it works well however you can go back from the main root.

For example when i use C:\copSSH\home{username} as that user i can go back into copSSH and into them directories too.

And I have a user setup to actually be C:\inetpub\wwwroot but that user can go into the system and everything i have this set as my path /cygdrive/c/inetpub/wwwroot

It would be ideal if the user could only go forward from the start directory, rather than out and about there is no write ability but there is read and download.......


share|improve this question
looks like you want to do a chroot'd jail for those users - not sure how to do that with CopSSH, though –  warren Mar 10 '10 at 19:18
add comment

1 Answer

up vote 2 down vote accepted

Apparently there are some limitations to chroot style environments in Cygwin. There is a forum discussion on this here.

Ultimately, the following workaround is suggested (from the copSSH FAQ):

How can I limit users' access to their home directories only ?

I recommend to use NTFS permissions for that purpose.

  1. Make a local group.

    net localgroup CopsshUsers /ADD

  2. Deny access to this group at top level.

    cacls c:\ /c /e /t /d CopsshUsers

  3. Open access to the copSSH installation directory.

    cacls copssh-inst-dir /c /e /t /r CopsshUsers

  4. Add Copssh user to the group above.

    net localgroup CopsshUsers user /add

  5. COPSSH user activation can then be used to allow access at home directory level.

Repeat steps 4 and 5 for each user.

share|improve this answer
right okay cool thanks for the advise –  minus4 Mar 12 '10 at 9:41
Sure thing, frankly I was surprised you couldn't do this in Cygwin easily. –  MT. Mar 12 '10 at 16:49
add comment

Your Answer


