Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Stopping users from cd'ing and quota on FTP?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Phant0m51
Tux's lil' helper
Tux's lil' helper


Joined: 30 Mar 2003
Posts: 105

PostPosted: Thu Feb 05, 2004 6:25 am    Post subject: Stopping users from cd'ing and quota on FTP? Reply with quote

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
View user's profile Send private message
kaffeen
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2004
Posts: 139
Location: The Frozen North

PostPosted: Thu Feb 05, 2004 6:51 am    Post subject: chroot Reply with quote

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
View user's profile Send private message
Phant0m51
Tux's lil' helper
Tux's lil' helper


Joined: 30 Mar 2003
Posts: 105

PostPosted: Thu Feb 05, 2004 7:02 am    Post subject: Reply with quote

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
View user's profile Send private message
kaffeen
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2004
Posts: 139
Location: The Frozen North

PostPosted: Thu Feb 05, 2004 7:08 am    Post subject: Chroot Reply with quote

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
View user's profile Send private message
Phant0m51
Tux's lil' helper
Tux's lil' helper


Joined: 30 Mar 2003
Posts: 105

PostPosted: Thu Feb 05, 2004 3:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
kaffeen
Tux's lil' helper
Tux's lil' helper


Joined: 27 Jan 2004
Posts: 139
Location: The Frozen North

PostPosted: Thu Feb 05, 2004 3:50 pm    Post subject: Quotas Reply with quote

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
View user's profile Send private message
Phant0m51
Tux's lil' helper
Tux's lil' helper


Joined: 30 Mar 2003
Posts: 105

PostPosted: Thu Feb 05, 2004 4:07 pm    Post subject: Reply with quote

That's OK. I did some searching, and I found some patches to apply to my kernel to support reiserfs Quota's.

https://forums.gentoo.org/viewtopic.php?t=94722&highlight=reiser+quota

The last post in that thread has a link to some patches.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum