Hi! I think I’ve found a bug in the way that Report (nethesisdante) counts users in nextcloud.
I have 2 users (3 with the admin), configured by local LDAP.
On nextcloud the admin user (default) can see 4 users as expected:
But in the report I can see only 2 users, one of wich is the internal admin. The missing user (fry) is the one that uses the most of space.
Any idea on why?
Yes, I understand, but my problem is in the report:
(I was not able to upload the screenshot in the first post because of the rules of this forum)
As you can see there are only two users in the report (not in nextcloud but in dante), the user “fry” is missing!
Ciao Giacomo la risposta è la seguente: /usr/share/dante/miners/nextcloudsize-list
{"aggregationType":"snapshot","unit":"bytes","anonymizable":true,"data":[{"count":659480627,"name":"Maria Pia (mpia)"},{"count":13011031,"name":"admin"}],"type":"list","minerId":"nextcloudsize-list"}
Analizzando il codice ho visto che tutto si basa su questa query fatta su occ: su - apache -s /bin/bash -c "source /opt/rh/rh-php72/enable; cd /usr/share/nextcloud/; php occ --output=json user:list" 2>/dev/null
{"3d8a87a2-bde9-1039-99b3-35621bd263cc":"Maria Pia (mpia)","98a67fd2-a576-1039-9497-29e3eade07eb":"Francesco (fry)","admin":"admin","cb8cb43a-a575-1039-9494-29e3eade07eb":"admin (admin)"}
Ho provato anche ad eseguire il comando per vedere la dimensione delle cartelle ed il risultato è questo: du -b --max-depth=1 -c /var/lib/nethserver/nextcloud/ 2>/dev/null| sort -n -r
3626504855 /var/lib/nethserver/nextcloud/
3626504855 total
1536174580 /var/lib/nethserver/nextcloud/98a67fd2-a576-1039-9497-29e3eade07eb
1417541172 /var/lib/nethserver/nextcloud/appdata_oc1r6wch1jjr
659480627 /var/lib/nethserver/nextcloud/3d8a87a2-bde9-1039-99b3-35621bd263cc
13011031 /var/lib/nethserver/nextcloud/admin
221390 /var/lib/nethserver/nextcloud/files_external
Secondo me l’errore è alla riga 50 next if ($i <= 3); # skip total lines
commentando quella tutto funziona. Mi pare sbagliata perchè i totali occupano 2 righe e non 3, inoltre non capisco tanto a cosa serva visto che dopo l’array viene intersecato con gli utenti e quindi le righe dei totali vengono comunque saltate.
Che ne dici?
Hi Giacomo, I think that a new bug appeared after the last update (NethServer 7.8.2003):
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at /usr/share/dante/miners/nextcloudsize-list line 40.
If I manually execute the command that I found at line 40 I get this: