1

I installed PureFTP using the instructions available here PureFTP Ubuntu Help. The FTP server is now up and running.

I have 1 ftp user group (ftpgroup), 1 user (ftpuser - I am not entirely sure what this is, step 2.2 in the instructions linked) and 2 ftp users (user1 and user2).

I now want to assign quota to both user1 and user2, so that they can not write over a specified amount, lets say 100MB. How do I do that?

Waqas Tariq
  • 1,023
  • 1
  • 11
  • 13

1 Answers1

1

This is old but someone else might use it:

sudo pure-pw usermod user1 -N 100 -m

Above will add user1 quota of 100 MB

  • -N = quota in MB
  • -m = build credentials database (if you omit this you have to run sudo pure-pw mkdb to apply changes)

Make sure to use -N not -n.

-n (lowercase n) will set file limit - a number of files, not the size.

Thomas
  • 6,463
  • 13
  • 34
  • 38
stawiu
  • 11
  • How to control what happens if the limit is reached? For example, how to delete oldest files if ftp quota is reached? – W.M. Feb 08 '18 at 19:56
  • 1
    Your idea sounds like a solution on top of FTP. What happens is when attempting to write/upload a file that exceeds the quota - transfer fails. Not even an error of how much storage is left or in use but that as well as deleting the oldest file could be added using custom external application... – stawiu Feb 09 '18 at 23:32