You are not logged in.

#1 2007-10-25 22:39:47

ramoneur
Member
Registered: 2007-06-04
Posts: 89

sftp into only 1 folder.

i have sshd on my computer to be able to access it from my school.
the thing is i want to set up a ftp server also which only connects to a single folder on my system, so that the person connecting through ftp only can see that folder and not mess around with anything else on my system.

so i searched a bit and found out that ftp is not so secure, but with ssh i get sftp which is much more secure.
ive tried sftp from my school through winscp (a windows ftp client), and i am able to access my whole computer in terms of which user im connecting as.
so i thought, how to make a user that only have access to a single folder on my harddrive and nothing else, and use that user to login via sftp? that would be exactly what im looking for, since i want my friends to access some files that i have choosen to share with them in that folder, and them to upload files to me. they should be able to do whatever they want in that folder except deleting and modifying files, once in there it stays there until i delete it. so basically they should be able to read all files, and upload new files, no execution, no modifying/deletion.

so how to do this?

btw sry for my english, if its something not clear, ask please.


A w e s o m e
r
c
h

Offline

#2 2007-10-26 10:38:44

chimeric
Member
From: Munich, Germany
Registered: 2007-10-07
Posts: 254
Website

Re: sftp into only 1 folder.

Hi,

I think the only way to accomplish this is by creating a separate chroot environment see [1]. And eventually you can set a special umask for those users so the file-privileges are automatically dropped once a file is created.

HTH

[1]http://wiki.archlinux.org/index.php/Openssh-chroot

Offline

Board footer

Powered by FluxBB