Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Maximum allowable storage for a certain directory?
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
ianskate
n00b
n00b


Joined: 01 Jun 2004
Posts: 10

PostPosted: Tue Jun 22, 2004 4:51 pm    Post subject: Maximum allowable storage for a certain directory? Reply with quote

Hi, I'm trying to set up a few virtually hosted sites for friends, running on subdomains of my site, and I was wondering if there was a way to somehow limit the maximum total storage for the directory that belongs to them, so they don't fill up the drive with crap.

I don't know where to start... I don't think it's possible to do anything with the FTP, because that deals with the uploads at the time, not the total storage in there home directory. Is this true? Am I totally lost here?

I'm using Apache, and Pureftp, so if anything can be changed with those, it'll help. Also, I've already set up virtual user accounts, and everything is working, I just need to try and limit the directory they own.

Thanks for any help.
Back to top
View user's profile Send private message
rmalolepszy
Apprentice
Apprentice


Joined: 01 Jan 2004
Posts: 167

PostPosted: Tue Jun 22, 2004 5:04 pm    Post subject: Reply with quote

You can do this in two ways.

Enable quota's in the kernel and set em up.

or via pure-ftpd

Quote:
pure-pw useradd <login> [-f <passwd file>] -u <uid> [-g <gid>]
-D/-d <home directory> [-c <gecos>]
[-t <download bandwidth>] [-T <upload bandwidth>]
[-n <max number of files>] [-N <max Mbytes>]
[-q <upload ratio>] [-Q <download ratio>]
[-r <allow client host>[/<mask>][,<allow client host>[/<mask>]]...]
[-R <deny client host>[/<mask>][,<deny client host>[/<mask>]]...]
[-i <allow local host>[/<mask>][,<allow client host>[/<mask>]]...]
[-I <deny local host>[/<mask>][,<deny local host>[/<mask>]]...]
[-y <max number of concurrent sessions>]
[-z <hhmm>-<hhmm>] [-m]


-N ### max number of Mbytes is what you're looking for.
_________________
Cheers,
Ryan
Back to top
View user's profile Send private message
ianskate
n00b
n00b


Joined: 01 Jun 2004
Posts: 10

PostPosted: Tue Jun 22, 2004 5:06 pm    Post subject: Reply with quote

Cool, I'll try the Pureftp option first, and let you know if it works.
(Seems much easier at the moment)

Thanks :)
Back to top
View user's profile Send private message
ianskate
n00b
n00b


Joined: 01 Jun 2004
Posts: 10

PostPosted: Tue Jun 22, 2004 5:14 pm    Post subject: Reply with quote

Ok, it doesn't seem to have an effect. I used usermod, to add that one setting, and I put it really low to test it. Am I supposed to put in everything about the user (the same way as creating it) when i modify?


pure-pw usermod username -N 1 (did nothing)

updated the database (even if I didn't need to):
pure-pw mkdb /etc/pureftp.pdb -f /etc/pureftpd.passwd

Edit: Nevermind, I got it to work by restarting pure-ftp. I really never thought that it needed a restart when dealing with accounts, but I guess it did, because that made it work.
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