Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.......

thanks

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

1 Answer 1

up vote 2 down vote accepted
+100

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.