View previous topic :: View next topic |
Author |
Message |
Phant0m51 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 30 Mar 2003 Posts: 105
|
Posted: Thu Feb 05, 2004 6:25 am Post subject: Stopping users from cd'ing and quota on FTP? |
|
|
What I want to do is setup an FTP server, and have the users login, and not be able to do anything but upload/download from 1 specific folder (for each user). I also want to put a quota on folders, can I do that? Not entire partitions, just single folders?
Example:
Larry123 connects, and uploads/downloads stuff to /home/Larry123/
Sarah123 connects, and uploads/downloads stuff to /home/Sarah123/
They can't change directories, can't su, can't do anything but upload/download files from this specific directory.
I want Larry123 to have a 500 MB max quota, and Sarah123 to have 3 GB max quota.
Is this even possible? I've done some searching, and looked at some quota stuff, but I'm still not sure if this is possible. Any ideas? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaffeen Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/53096610341742a1b5f9e7.jpg)
Joined: 27 Jan 2004 Posts: 139 Location: The Frozen North
|
Posted: Thu Feb 05, 2004 6:51 am Post subject: chroot |
|
|
With vsftpd I was able to setup a chroot list where each use who logged into the ftp server was bound to their home directory. This is essentially what I believe you're looking for. Correct me if I'm wrong. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Phant0m51 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 30 Mar 2003 Posts: 105
|
Posted: Thu Feb 05, 2004 7:02 am Post subject: |
|
|
That is exactly what I want to happen. I'm a newb to linux, so I don't get how to force a chroot to be bound to a specific directory. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaffeen Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/53096610341742a1b5f9e7.jpg)
Joined: 27 Jan 2004 Posts: 139 Location: The Frozen North
|
Posted: Thu Feb 05, 2004 7:08 am Post subject: Chroot |
|
|
I don't recall exactly how it is done but the documentation that comes with vsttpd explains it very well.
Essentially, it's the same thing that happens when you chroot'd during the gentoo install. The user logs into your ftp server and gets access only to their home directory.
If you want only this type of access, you will want to disable anonymous logins unless you chroot user ftp as well.
Sorry I can't give you exact directions at the moment. It's getting a bit late here and my head hurts. If you want some material to digest on the subject, head over to http://vsftpd.beasts.org and take a look at their documentation.
I'm certain that other FTP servers can provide this functionality but this is the only one I've ever done it with personally. I'll be setting up my FTP server in the next couple days and will be doing the same thing so if you haven't got it working, drop me an email at dakay [at] shaw [dot] ca. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Phant0m51 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 30 Mar 2003 Posts: 105
|
Posted: Thu Feb 05, 2004 3:47 pm Post subject: |
|
|
You've been very helpful, and I thank you for that. I've hit a small snag though. I followed the Installation instructions to a T, and I put my entire / partition as ReiserFS. Well ReiserFS doesn't support Quota's, so I may have to re-install Gentoo so that I can put either Ext3 or XFS on my partition (I'm going to change it though. /home will be it's own seperate partition).
Unless there's some way to set Quota's with Reiser, I'm screwed ATM.
Thanks again for your help!
Jonathan |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kaffeen Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/53096610341742a1b5f9e7.jpg)
Joined: 27 Jan 2004 Posts: 139 Location: The Frozen North
|
Posted: Thu Feb 05, 2004 3:50 pm Post subject: Quotas |
|
|
Sorry but I've never played with quotas. Have always made a seperate partition for my FTP directory (which I guess is a pretty crude way of enforcing a quota on the partition). |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Phant0m51 Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 30 Mar 2003 Posts: 105
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|