Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: User Quota can not be changed - revert back to previous value #34961

Closed
6 of 9 tasks
luddinho opened this issue Nov 3, 2022 · 65 comments · Fixed by #35308
Closed
6 of 9 tasks

[Bug]: User Quota can not be changed - revert back to previous value #34961

luddinho opened this issue Nov 3, 2022 · 65 comments · Fixed by #35308
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug regression

Comments

@luddinho
Copy link

luddinho commented Nov 3, 2022

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

When trying to change the quota of an existing user the value revert back to the previous one after confirming the changes and refresh the user settings page.

Steps to reproduce

  1. Open the WebUI and open the "Users" preference pane.
  2. Select on the left side "Active users"
  3. Selct the icon "Edit User" of an existing user (e.g. non admin user)
  4. chnage the current quota value to a new one. e.g. increase from 5 GB to 10 GB
  5. hit the button "Done"
  6. Quota will display the new entered value
  7. Select on the left side the group "Admins"
  8. Go back to the group of "Acitve users"
  9. Check the Quota value: It will show again the previous value of 5 GB

If the value will be modified by decrasing it, the new value will be stored.
But after that it is not possible to increase the value again.
It is only possible to decrease the value until it becomes zero "0" Bytes.

Create a new user:

With a new created user there seems to be no problem either by increasing or decreasing the quota value.

Expected behavior

Changing the user quota shall be possible in both direction, independent of decreasing or increasing.

Installation method

Official All-in-One appliance

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 22.2.3 to 22.2.4)

Are you using the Nextcloud Server Encryption module?

No response

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.7.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "default_phone_region": "DE",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "defaultapp": "files",
        "maintenance": false,
        "enable_previews": true,
        "logtimezone": "Europe\/Berlin",
        "theme": "",
        "loglevel": 2,
        "updater.release.channel": "stable"
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.10.0
  - activity: 2.16.0
  - apporder: 0.15.0
  - breezedark: 24.0.2
  - calendar: 3.5.2
  - checksum: 1.1.5
  - circles: 24.0.1
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contacts: 4.2.2
  - dashboard: 7.4.0
  - dav: 1.22.0
  - federatedfilesharing: 1.14.0
  - federation: 1.14.0
  - files: 1.19.0
  - files_external: 1.16.1
  - files_pdfviewer: 2.5.0
  - files_rightclick: 1.3.0
  - files_sharing: 1.16.2
  - files_trashbin: 1.14.0
  - files_versions: 1.17.0
  - files_videoplayer: 1.13.0
  - firstrunwizard: 2.13.0
  - forms: 2.5.1
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.1
  - oauth2: 1.12.0
  - password_policy: 1.14.0
  - photos: 1.6.0
  - polls: 3.8.3
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - quota_warning: 1.15.0
  - recommendations: 1.3.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - spreed: 14.0.6
  - survey_client: 1.12.0
  - systemtags: 1.14.0
  - text: 3.5.1
  - theming: 1.15.0
  - twofactor_backupcodes: 1.13.0
  - twofactor_totp: 6.4.1
  - twofactor_webauthn: 0.3.3
  - updatenotification: 1.14.0
  - viewer: 1.8.0
  - workflowengine: 2.6.0
Disabled:
  - admin_audit
  - bruteforcesettings: 2.4.0
  - contactsinteraction: 1.2.0
  - encryption
  - support: 1.4.0
  - user_ldap
  - user_status: 1.3.1
  - weather_status: 1.3.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

  • Browser independent (Edge, Firefox, Chrome...)
  • Maintaining 5 Nextcloud instances of different machines at different locations, same behavior on all servers
  • Nextcloud version 24.0.7
  • No LDAP users configured (no possible influence of foreign quota settings)
  • Using Default user-backend
@luddinho luddinho added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Nov 3, 2022
@Dee-san
Copy link

Dee-san commented Nov 4, 2022

Same issue here!
All my accounts got 0 Bytes quota and I cannot change it! Massive bug!
Cannot upload/change files anymore - any way to change it in database directly?

  • Nextcloud version 24.0.7
  • Using Default user-backend
  • Did the update using the web-based updater from 24.0.6 to 24.0.7

@luddinho
Copy link
Author

luddinho commented Nov 4, 2022

All my accounts got 0 Bytes quota and I cannot change it!

For me only 1 user is affected with the 0 Bytes issue. All other instances are affected with the problem that the quota can not be increased at the moment.

I also recognized this immediatelly after the update from 24.0.6 to 24.0.7.
In my case I performed the update via console with the command /var/www/nextcloud/updater/updater.phar --no-interaction.

@pultis
Copy link

pultis commented Nov 4, 2022

Reproduced on my nextcloudpi installation (update via web frontend from 24.0.6 to 24.0.7).

Three users with data > 500 MB are affected. It is not possible to increase the quota via CLI.

@luddinho
Copy link
Author

luddinho commented Nov 5, 2022

It is not possible to increase the quota via CLI.

As far as I know there is no possibility to do this via CLI. I can not find anything regarding this from the admin manual.
I had the hope that there might be a occ user comamnd that can change the quota User commands, but it isn´t.

@Dee-san
Copy link

Dee-san commented Nov 5, 2022

It is not possible to increase the quota via CLI.

As far as I know there is no possibility to do this via CLI. I can not find anything regarding this from the admin manual. I had the hope that there might be a occ user comamnd that can change the quota User commands, but it isn´t.

There is one, but it doesn't work.

If I try to set the quota to 10 GB:
sudo -u www-data ./occ user:setting user files quota 10GB

It shows me the correct value afterwards:
sudo -u www-data ./occ user:setting user files quota

But it's not being applied, as the WebUI still shows me 0 B..
I hope the devs are onto it for a quick fix/workaround

EDIT: for the moment, I actually managed to give unlimited quota to my users.

  1. You first need to set quota to "default"
  2. Save
  3. Change to "unlimited"
  4. Save again

Hopefully, it will stay like this.
Not a real fix, but at least I can continue syncing my files

@luddinho
Copy link
Author

luddinho commented Nov 6, 2022

There is one, but it doesn't work.

Thanks for the info, I was not aware about all the available option parameters and values especially the arguments how to use it.
Usage: user:setting [options] [--] <uid> [<app> [<key> [<value>]]]
However, I tried on my side also with the CLI. I can confirm the same behavior as described by @Dee-san.

Thanks for the note with steps as workaround to apply "unlimited" quota. This worked also on my side.

@JR0815
Copy link

JR0815 commented Nov 7, 2022

I updated to NC 24.0.7 (from .5, was working there, running on pi3 with Raspbian, Apache2, php 7.4, MariaDB) and users who had 5 GB quota were automatically changed to 1 GB. Increasing not possible, but setting to unlimited works directly.

@LeSpocky
Copy link

LeSpocky commented Nov 8, 2022

I was also affected with NC 24.0.7. Bug persists after upgrading to 25.0.1. Unabled to upload files. Makes collaborating impossible.

@LeSpocky
Copy link

LeSpocky commented Nov 8, 2022

I was also affected with NC 24.0.7. Bug persists after upgrading to 25.0.1. Unabled to upload files. Makes collaborating impossible.

NC is running on Debian GNU/Linux 11 (bullseye) with kernel 5.10.0-19-686-pae here (yes, that's still a 32 bit system). DB is MariaDB 10.5.15, PHP 7.4.30 (both from Debian). Webserver is lighttpd/1.4.59.

@emc02
Copy link

emc02 commented Nov 8, 2022

Same here
I've downgraded to 24.0.6!
I know nextcloud is a community project and we are beta/alpha tester for production, but that kind of failure should not happen!

@Dee-san
Copy link

Dee-san commented Nov 8, 2022

Same here I've downgraded to 24.0.6! I know nextcloud is a community project and we are beta/alpha tester for production, but that kind of failure should not happen!

I always do the same mistake and don't take a snapshot/backup of my Nextcloud VM - this will be the last time, as this issue here is quite serious and unacceptable (can be compared with the update which broke creation/modification date of synched files). I hope everyone does the same and encourage to take the time to do so..

@emc02
Copy link

emc02 commented Nov 8, 2022

Same here I've downgraded to 24.0.6! I know nextcloud is a community project and we are beta/alpha tester for production, but that kind of failure should not happen!

I always do the same mistake and don't take a snapshot/backup of my Nextcloud VM - this will be the last time, as this issue here is quite serious and unacceptable (can be compared with the update which broke creation/modification date of synched files). I hope everyone does the same and encourage to take the time to do so..

well I didn't have a real backup (just doing this weekly and I tried not to loose all changes since Sunday)
I've just stopped the apache server, downloaded 24.0.6, put the old config file from weekly backup and current data inside the folder and startet apache.
Did not revert the database or anything else. (Try at your own risk! My installation is just for my family, so I can risk some troubles there :-D )
My first attempt to update was 24.0.6 -> 25.0.1 and then there was the quota error and the 64bit error. I was thinking the Quota error is related to drop of 32bit support, but that seems an other issue.
So currently I am running on an database that went through 24.0.6 -> 25.0.1 -> 24.0.6 -> 24.0.7 -> 24.0.6 :-D

edit: on reverting back to 24.0.6 the quota error persists and changing quotas in web interface is still buggy, but changing per CLI worked after some attempts (I've tried to edit the quota directly in the database, but didn't find the right entries, maybe someone knows where they are hiding?)

@Dee-san
Copy link

Dee-san commented Nov 8, 2022

well I didn't have a real backup (just doing this weekly and I tried not to loose all changes since Sunday) I've just stopped the apache server, downloaded 24.0.6, put the old config file from weekly backup and current data inside the folder and startet apache. Did not revert the database or anything else. (Try at your own risk! My installation is just for my family, so I can risk some troubles there :-D ) My first attempt to update was 24.0.6 -> 25.0.1 and then there was the quota error and the 64bit error. I was thinking the Quota error is related to drop of 32bit support, but that seems an other issue. So currently I am running on an database that went through 24.0.6 -> 25.0.1 -> 24.0.6 -> 24.0.7 -> 24.0.6 :-D

This is another thing I just found out - NC drops 32bit support, which means I need to migrate my whole installation at any point next year - at least they came back to their senses and re-added support for 25.0.2 (1st december), even if it's just for another year..

edit: on reverting back to 24.0.6 the quota error persists and changing quotas in web interface is still buggy, but changing per CLI worked after some attempts (I've tried to edit the quota directly in the database, but didn't find the right entries, maybe someone knows where they are hiding?)

It's here:

MariaDB [(none)]> use nextcloud
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [nextcloud]> select * from oc_preferences where oc_preferences.appid = 'files' and oc_preferences.configkey = 'quota';
+--------+-------+-----------+-------------+
| userid | appid | configkey | configvalue |
+--------+-------+-----------+-------------+
| user1 | files | quota     | none        |
| user2 | files | quota     | none        |
| user3 | files | quota     | none        |
+--------+-------+-----------+-------------+
3 rows in set (0.001 sec)

@emc02
Copy link

emc02 commented Nov 8, 2022

It's here:

thats very interesting.
Tried to edit this value 512GB ->768GB and it worked
changing the value back to 512GB did not work...

EDIT: ok, it seems it needs a cron.php run to shrink the size

another bug (since NC24.0.?) is, that my used space is shrinking and after occ filescan it showes up correctly and then after a few days it's shrinking again (from about 350GB to 30GB) (maybe it's a known bug, but I did not search for it)

@Dee-san
Copy link

Dee-san commented Nov 8, 2022

EDIT: ok, it seems it needs a cron.php run to shrink the size

Interesting.. so it is the cron job who seems to mess with the quotas

another bug (since NC24.0.?) is, that my used space is shrinking and after occ filescan it showes up correctly and then after a few days it's shrinking again (from about 350GB to 30GB) (maybe it's a known bug, but I did not search for it)

Don't worry.. have the same problem. I've got 65GB of files for a user and after a specific event (dunno which, probably after updates) all of a sudden, it's 30GB.
It appears that the scan for subfolders is not working as expected.

@szaimen
Copy link
Contributor

szaimen commented Nov 8, 2022

I just tried to reproduce and I am not able to. Increasing the quota works for me.
See

2022-11-08-183331.mp4

@emc02
Copy link

emc02 commented Nov 8, 2022

I just tried to reproduce and I am not able to. Increasing the quota works for me.
See

And decreasing?
Do you have a fresh installation

@szaimen
Copy link
Contributor

szaimen commented Nov 8, 2022

And decreasing?

Decreasing works as well.

Do you have a fresh installation

This is not a new instance. It was updated from 24.0.5 to 24.0.6 and now 24.0.7

However the user I am testing with is indeed newly created.

@szaimen
Copy link
Contributor

szaimen commented Nov 8, 2022

Okay I see. I can reproduce now with a user that is already present and not new.

cc @PVince81 @come-nc @icewind1991

@emc02
Copy link

emc02 commented Nov 8, 2022

I think a fresh Installation with 64bit OS and PHP and NC26 (after all bugs 🤣) would be neccesary for me. I've updated my Version since the fork of owncloud

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of regression and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Nov 8, 2022
@PVince81 PVince81 added this to the Nextcloud 24.0.8 milestone Nov 9, 2022
@PVince81
Copy link
Member

PVince81 commented Nov 9, 2022

Steps to reproduce:

  1. Setup NC 24.0.6 (in my case from git, not AIO)
  2. In the user management web UI set the default quota to 5 GB
  3. Create a user "olduser" and leave "default quota"
  4. Set the user's quota to 10 GB in the web UI (don't forget to click the tick mark to confirm)
  5. Upgrade to NC 24.0.7
  6. Create a user "newuser" and leave "default quota"
  7. Set the new user's quota to 10 GB in the web UI (don't forget to click the tick mark to confirm)
  8. Refresh the page, see that both have 10 GB
  9. Set both the old user and new user's quotas to 15 GB
  10. Refresh the page
  11. See that both have 15 GB now

=> works for me

Do I need a 32 bit system to reproduce this ? The original report states that it's 64 bit (checkbox).

Why would this apply only to new users and not old ones ?

For those affected, please run these for both affected and unaffected user:

  • select * from oc_appconfig where appid='files' and configkey='default_quota';
  • select * from oc_preferences where configkey='quota' and userid in ("olduser", "newuser");

For me those queries return the following info:

  • default quota says "5 GB"
  • olduser and newuser have the string "15 GB" as quota

For those where occ is not working for setting the quota, can you try updating it manually in the oc_preferences table ?
Does that value stick or is there some kind of ghost setting it back to the old value ?

@Dee-san
Copy link

Dee-san commented Nov 21, 2022

fix for quota delay is here: #35308

this does not solve issues with 32-bit which are unrelated

Well, I tried the adaptations in the fix and of course, it didn't solve the issue with false quota since I'm still on 32bit installation.
So this issue in this thread is not solved...

@PVince81
Copy link
Member

for 32-bits, you could try reverting #34032

@luddinho
Copy link
Author

luddinho commented Nov 22, 2022

for 32-bits, you could try reverting #34032

I have compared the files of the current Nextcloud instance where I´m having the issue on a 32 bit machine.
This mentioned issue #34032 does not solve the problem on my environment because the content of the file changes made are already present on my instance within the v24.0.7 update.

$ occ status
  - installed: true
  - version: 24.0.7.1
  - versionstring: 24.0.7
  - edition:
  - maintenance: false
  - needsDbUpgrade: false
  - productname: Nextcloud
  - extendedSupport: false

File comparison "OC_Helper.php" delivers the following differences:
left hand side the one from v24.0.7 instance, and on the right hand side the file from cb8be0c632
image that has been updated due to #34032.

The changes from line 98 (comment), 107, 134 are already persists on my NC instance as you can see from the comparison:
image

I´m still having problems setting the quota on the 32 bit machine as expected.
I can confirm the statement of @Dee-san that this issue has not been yet solved.

So this issue in this thread is not solved...

@luddinho
Copy link
Author

luddinho commented Nov 22, 2022

for 32-bits, you could try reverting #34032

@PVince81:
Sorry for my mistake!
Now I understood your proposal to "revert" the changes of #34032
I was thinking to use the changes of it, but you mentioned to revert those changes.

With reverting the changes of the file OC_Helper.php at the lines 107 and 134 it is again possible on a 32 bit machine to change the quota as expected. There is only the time delay to take effect of the new value directly after the upcomming cron has been executed.

OC_Helper.php

L107: return (float)$str;
L134: return $bytes;

On my system I can confirm to solve the quota issue on a 32 bit einvironmnent of reverting changes from #34032.

Since the v24 is not deprecated on 32 bit einvironmnents, is it planned to fix this issue officially in an upcoming patch release like v24.0.8?

@PVince81
Copy link
Member

@luddinho thanks a lot for testing and confirming.

PR to revert on NC 24: #35334

@PVince81
Copy link
Member

NC 25 revert for 32-bits: #35335

@Dee-san
Copy link

Dee-san commented Nov 28, 2022

for 32-bits, you could try reverting #34032

@PVince81: Sorry for my mistake! Now I understood your proposal to "revert" the changes of #34032 I was thinking to use the changes of it, but you mentioned to revert those changes.

With reverting the changes of the file OC_Helper.php at the lines 107 and 134 it is again possible on a 32 bit machine to change the quota as expected. There is only the time delay to take effect of the new value directly after the upcomming cron has been executed.

OC_Helper.php

L107: return (float)$str;
L134: return $bytes;

On my system I can confirm to solve the quota issue on a 32 bit einvironmnent of reverting changes from #34032.

Since the v24 is not deprecated on 32 bit einvironmnents, is it planned to fix this issue officially in an upcoming patch release like v24.0.8?

I'm sorry.. but as for me, it didn't help at all:
MariaDB [nextcloud]> select * from oc_preferences where oc_preferences.appid = 'files' and oc_preferences.configkey = 'quota';
+--------+-------+-----------+-------------+
| userid | appid | configkey | configvalue |
+--------+-------+-----------+-------------+
| user1 | files | quota | none |
| user2 | files | quota | none |
| user3 | files | quota | ? |
+--------+-------+-----------+-------------+

When I choose a quota of 1GB, it sets 1GB in database.
When I choose a quota of 5GB, it also shows 1GB.
When I choose a quota of 10GB, it shows "?".. what the heck?!

Maybe I forgot to change something, but did as you did in your description...
By the way.. I got offered to update to 25.0.1 and guess what - I couldn't see my files anymore (turned out to be 32bit related again!)
I know this is an open source project and that there are risks involved - but please take care when you radicaly change datatypes and "forget" about old installations (I bet most people have a NC instance on old NAS or raspberry servers) whithout testing it thoroughly - I spend so much time fixing issues with Nextcloud that it almost made me quit and use a commercial cloud again. Really frustrating!

@luddinho: could you please show me your OC_Helper.php if possible?
Thanks!

@PVince81
Copy link
Member

@Dee-san there is no guarantee that values higher than 4 GB will work correctly on 32-bit systems. It is already known that various code paths are causing trouble with 32-bit systems (ex: negative file sizes in the database).

The revert was only intended to make Nextcloud behave like it has in the previous version (ex: 24.0.6) before the regression. It is likely that this issue already existed before and would require further research.

@Dee-san
Copy link

Dee-san commented Nov 29, 2022

@Dee-san there is no guarantee that values higher than 4 GB will work correctly on 32-bit systems. It is already known that various code paths are causing trouble with 32-bit systems (ex: negative file sizes in the database).

The revert was only intended to make Nextcloud behave like it has in the previous version (ex: 24.0.6) before the regression. It is likely that this issue already existed before and would require further research.

I can confirm that this issue exists right after I updated from 24.0.6 to 24.0.7 - I logged into my account only to find out that I'm refused to upload new files because of quota exhaustion. (I had quota turned on for all my accounts). That's also when I found out about corrupt quota values in GUI ("0 B") and database ("?", " B", etc.)

@szaimen
Copy link
Contributor

szaimen commented Nov 29, 2022

https://help.nextcloud.com/t/deprecation-of-32-bit-support-ends-completely-with-nextcloud-26/150926

@luddinho
Copy link
Author

luddinho commented Dec 8, 2022

@luddinho: could you please show me your OC_Helper.php if possible?

If it helps, yes sure!
OC_Helper.php.txt

All my changes based on c39caba
as you can compare with my screenshot below.

image

@bcostacurta
Copy link

I was also affected with NC 24.0.7. Bug persists after upgrading to 25.0.1. Unabled to upload files. Makes collaborating impossible.

Still broken in 25.0.2.

The user disk quota interface is broken.
And commands
sudo -u www-data php /var/www/nextcloud/occ user:setting bruno files quota default
sudo -u www-data php /var/www/nextcloud/occ user:setting bruno files quota unlimited_
does not modify user 'bruno' disk quota, which remains unfortunately full.

@PVince81
Copy link
Member

PVince81 commented Dec 9, 2022

@bcostacurta please raise a separate issue

the issue that we fixed in this ticket was related to quota caching and only affected the web UI
your issue seems to be deeper and happening with occ commands

back when fixing quota we didn't observe such issue like yours, so we'll need more details about your setup => in a new ticket

thanks

@bcostacurta
Copy link

Thanks.
I'll create a new issue ticket.

Is there an "how to create an issue ticket" ? Meaning which useful infos, setup ..etc.. to put in an issue ticket.
Just to be sure I'll create a useful ticket.

Thanks.
Bruno

@Dee-san
Copy link

Dee-san commented Dec 10, 2022

@bcostacurta please raise a separate issue

the issue that we fixed in this ticket was related to quota caching and only affected the web UI your issue seems to be deeper and happening with occ commands

back when fixing quota we didn't observe such issue like yours, so we'll need more details about your setup => in a new ticket

thanks

Hi PVince81,

I'm sorry, but OP (and also I) were unable to set the quota of existing users at all - it was not not only a GUI problem, but it simply wouldn't apply the value correctly (see https://github.com/nextcloud/server/issues/34961#issuecomment-1329809760)
The issue is in fact still present in 25.0.2 and I'll join Bruno with his new ticket if necessairy.

@bcostacurta
Copy link

Should this issue #34961 be re-opened ?
Web GUI for users disk quota management is still broken version v25.0.2

In fact .. it seems even getting worst from previous v25.0.1 as now the current are no more display at all.

Screenshot from 2022-12-11 18-58-39

Bye
bruno

@emc02
Copy link

emc02 commented Dec 11, 2022

I've similar problems, 25.0.2 seems fully broken on my raspberry 32bit. 24.0.8 works fine (24.0.7 was broken too)

@PVince81
Copy link
Member

regarding 32-bits, see #35734 which might help

@juliani-77
Copy link

the same Problem on my nextcoud 25.0.2 on a raspiberry 4B too:

  • the only way to change existing user-quota is by "sudo -u www-data ./occ user:setting user1 files quota 10GB"
  • quota 5GB sets users-quota as before (1GB)
  • quota-s as 10GB & 3GB set user-quota as unlimited

@Dee-san
Copy link

Dee-san commented Jan 19, 2023

regarding 32-bits, see #35734 which might help

didn't solve the problem; even with 25.0.3, issue not solved

@bcostacurta
Copy link

bcostacurta commented Jan 19, 2023 via email

@bcostacurta
Copy link

bcostacurta commented Jan 19, 2023 via email

@PVince81
Copy link
Member

regardless of 32 bits, please all check that you also don't have leftover unencrypted_size as there's a known issue with this where quota is reported wrongly: #25283 (comment)

@Dee-san
Copy link

Dee-san commented Jan 20, 2023

It seems that the admin web interface for the user disk quota unfortunately breaks it. I used the following workaround via the command line to repair it : sudo -u www-data php /var/www/nextcloud/occ user:setting bruno files quota 10gb which reset correctly the disk quota for user 'bruno' Bruno

Wow, you are right!
This didn't work until version 25.0.3 ... at least I can set quotas now correctly!

So yeah; the interface seems to break the quota

@seraphyn
Copy link

Unfortunately, I still have the problem.
We log in with Shibboleth, so our accounts come from LDAP/ADS.
As soon as I set the new value for a user in the GUI or in the shell, it is visible in GUI and Shell.
But, as soon as the changed user logs in again, it is set to the old default value.

I was able to validate this behavior by always changing the default value.

If the user only has a local login, a newly set value is not overwritten.

I could also report this to Enterprise support, but I think it fits in here quite well

@hbqclh
Copy link

hbqclh commented Jul 24, 2023

Unfortunately, I still have the problem. We log in with Shibboleth, so our accounts come from LDAP/ADS. As soon as I set the new value for a user in the GUI or in the shell, it is visible in GUI and Shell. But, as soon as the changed user logs in again, it is set to the old default value.

I was able to validate this behavior by always changing the default value.

If the user only has a local login, a newly set value is not overwritten.

I could also report this to Enterprise support, but I think it fits in here quite well

I found the reason for the issue. It's because there is a user quota in the LDAP configuration, and strangely, its priority is the highest. The solution to this problem is simple - just keep it empty.

image

@come-nc
Copy link
Contributor

come-nc commented Jul 27, 2023

I found the reason for the issue. It's because there is a user quota in the LDAP configuration, and strangely, its priority is the highest. The solution to this problem is simple - just keep it empty.

This configuration option is to have a default value for quota from LDAP. Once you set it, all LDAP users appear to have a quota set in LDAP, and quotas from LDAP have the priority over quotas from Nextcloud.
Maybe the UI should be adapted to make this more obvious, and disable Nextcloud quota field in this case. Not sure how easy that would be to implement cleanly though.

@manu-p
Copy link

manu-p commented Jun 6, 2024

Hi, same on a 27.5.1 where I have no access to occ nor the database (IONOS managed Nextcloud).

I can see this issue is closed, so my question is: what can be done to get user quota as wished?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.