Koozali.org: home of the SME Server

nextcloud quotas

Offline jameswilson

  • *
  • 788
  • +0/-0
    • Security Warehouse, trade security equipment
nextcloud quotas
« on: March 08, 2024, 10:40:40 PM »
Hi All
Ive been playing with using nextcloud for when people want to send huge emails.
Got it working and upgraded well easy. What a brilliant just works contrib!

However i have an issue with quotas and a question
Knowing how users are they will just keep throwing stuff at the server regardless of how much space they have left.
So how do i get quotas to work, ive added in the nextcloud ui and on the sme as a soft / hard limit.

all accounts show 0b of 10G used even though there is use.

Next one is how do i remove older files ie the user has 10 gig so once at 9+ delete old stuff in all directorys till <9G
My thinking is this allows them to keep throwing stuff to send without moaning at me that there limit is reached.

Thanks

Offline Jean-Philippe Pialasse

  • *
  • 2,818
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: nextcloud quotas
« Reply #1 on: March 09, 2024, 04:56:51 AM »
unless they store in ibays and sme home using nextcloud, and hence use the samba connector (external files), all data is stored on the sme using the www user.  you then need to handle quotas at nextcloud level.

https://docs.nextcloud.com/server/latest/user_manual/en/files/quota.html#


yes this means 2 layers of quota:
- one for NC
- one for emails and ftp/ssh/samba added files.

potentially NC quota will take into account both samba available shares (vie external files app) and NC storage but need to check. 
« Last Edit: March 09, 2024, 04:58:37 AM by Jean-Philippe Pialasse »

Offline jameswilson

  • *
  • 788
  • +0/-0
    • Security Warehouse, trade security equipment
Re: nextcloud quotas
« Reply #2 on: March 14, 2024, 03:03:46 PM »
Hi JP
Yes i have enabled quota for the userrs in sme and on nextcloud.
However there seems to a config.php file according to nextcloud wiki where quota on external folders needs to be enabled.
I cant see the config file for next cloud anywhere and assume it will be a db anyway.
I have tried adding that entry to the db but allas every user still shows as '0B of 10G' regardless. However does show the folder sizes in nextcloud.

Ideally where I want to be is limit the users to xGb and only keep the latest files upto that limit.
I want to use it for sharing large files and I know my users wont delete old stuff and will juet keep adding new stuff till it stops working then phone me as its not working.
I can see this probably isnt something that nextclloud or SME can do so im wondering if i can have access to all users folders from the admin smb login and remove files that way

Offline Jean-Philippe Pialasse

  • *
  • 2,818
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: nextcloud quotas
« Reply #3 on: March 14, 2024, 11:59:29 PM »
nextcloud will not take into account delete files and previous versions. 
nextcloud doew not take into account files in external repo meaning will not count into its quota ibays and user sme home. 

sme will only take into account in its quota files with the user ownership wherever they are even in a  Trash bin. It will not take into account files only accessible by nextcloud as they are not owned by the user but by www.

you hence need to configure two times the quota in two separate places and to understand when they call you which one is full.