View previous topic :: View next topic |
Author |
Message |
ianskate n00b
Joined: 01 Jun 2004 Posts: 10
|
Posted: Tue Jun 22, 2004 4:51 pm Post subject: Maximum allowable storage for a certain directory? |
|
|
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 |
|
|
rmalolepszy Apprentice
Joined: 01 Jan 2004 Posts: 167
|
Posted: Tue Jun 22, 2004 5:04 pm Post subject: |
|
|
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 |
|
|
ianskate n00b
Joined: 01 Jun 2004 Posts: 10
|
Posted: Tue Jun 22, 2004 5:06 pm Post subject: |
|
|
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 |
|
|
ianskate n00b
Joined: 01 Jun 2004 Posts: 10
|
Posted: Tue Jun 22, 2004 5:14 pm Post subject: |
|
|
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 |
|
|
|
|
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
|
|