Nextcloud after Platform Update System: 1755 lost admin

Hey not sure if it is completely related but i noticed that after updating to the new platform today, my nextcloud instance lost admin access

Might be related, after upgrade I received a nextcloud configuration error message and found all external storage was now set off. Ssh showed no /data folder either, no internal or external. Looking into why now.

lost admin access

Could you show output and try the workaround:

Getting this issue

root@syncloud:~/snap/nextcloud# snap run nextcloud.psql -c “update oc_ldap_group_mapping set owncloud_name = ‘admin’”
could not change directory to “/root/snap/nextcloud”: Permission denied
UPDATE 1
root@syncloud:~/snap/nextcloud# snap run nextcloud.psql -c “update oc_ldap_group_members set owncloudname = ‘admin’”
could not change directory to “/root/snap/nextcloud”: Permission denied
UPDATE 1

This is not an error actually, check your admin rights in Nextcloud.

Also could you run check:

snap run nextcloud.psql -c "select * from oc_ldap_group_mapping"

snap run nextcloud.psql -c "select * from oc_ldap_group_members"

Ok so just to be clear the commands above did not result if gaining admin access in the web interface of nextcloud which I had before the platform update

owncloud_name | ldap_dn | directory_uuid | ldap_dn_hash
---------------±-----------------------------------------±-------------------------------------±-----------------------------------------------------------------
admin | cn=syncloud,ou=groups,dc=syncloud,dc=org | e9b3306a-12be-103d-877c-fbad2677ec47 | aac22646179b2b187a05c325be3431b95e39ef12a19def4ad4ea2e3aa0dc5123
(1 row)

and

owncloudname | owncloudusers
--------------±-------------------------------
admin | a:1:{i:0;s:12:“marxistvegan”;}
(1 row)
root@syncloud:~#

Am I right you can login to nextcloud but cannot see admin features like users page?
Can you send a screenshot?

That is correct

Can you try this command:

snap run nextcloud.occ group:adduser admin marxistvegan

I actually did that yesterday and nothing changed then, I am outside of my home until late tonight before I could run it again.

ok if that does not work send logs please.

nevermind it seemed to have been sent this time.

Nothing interesting in the logs, if adduser does not help I can only advise you to reinstall nextcloud.

Going to add this to see if it help before I consider reinstalling nextcloud. I created a new user in the users app and that one has admin powers. From the two commands on the db this is what I see

owncloud_name | ldap_dn | directory_uuid | ldap_dn_hash
---------------±-----------------------------------------±-------------------------------------±-----------------------------------------------------------------
admin | cn=syncloud,ou=groups,dc=syncloud,dc=org | e9b3306a-12be-103d-877c-fbad2677ec47 | aac22646179b2b187a05c325be3431b95e39ef12a19def4ad4ea2e3aa0dc5123
stephen | cn=stephen,ou=groups,dc=syncloud,dc=org | e896dd4c-216b-103d-9a5c-0b46b46267ba | 225697ad5c367326c30452c4a53920d321e15eade16397709502b2edc2194de5
(2 rows)
(END)

root@syncloud:~# snap run nextcloud.psql -c “select * from oc_ldap_group_members”
could not change directory to “/root”: Permission denied
owncloudname | owncloudusers
--------------±-------------------------------
admin | a:1:{i:0;s:12:“marxistvegan”;}
stephen | a:1:{i:0;s:7:“stephen”;}
(2 rows)

and the group list created a new group which I tried to add myself to but to no avail on having admin powers on the primary but i do on the new account ‘stephen’

root@syncloud:~# snap run nextcloud.occ group:list

  • admin:
    • stephen
    • marxistvegan
  • stephen:
    • marxistvegan
    • stephen

what about:

snap run nextcloud.occ group:removeuser admin marxistvegan
snap run nextcloud.occ group:adduser admin marxistvegan

Did that too to no avail, wouldnt actually remove is i think part of the issue

Also wondering since i have two users at the moment what would happen if i delete the original user via Users app and recreate it, will all the nextcloud account regain all in it including calendar, contacts and deck? I know obiviously backup before but askin more technically in the way users are setup?

One more thing to try before you remove the original user.
Can you rung this:

/snap/platform/current/openldap/bin/ldapsearch.sh -x -w syncloud -D "dc=syncloud,dc=org" -b "cn=syncloud,ou=groups,dc=syncloud,dc=org"

This will show if admin group contains your user in memberUid property, if not that would explain the issue.

I you user is not listed in memberUid property of syncloud group you can add it in Users app.

  1. Users
  2. Your user
  3. Group membership
  4. Add < syncloud group from available groups
  5. Save

Hey just want to share, I am not exactly sure when this happened but I am guessing in the last couple of months, but my main user, which lost admin powers, somehow regained it. My previous work around was to have an admin user, but now that i have regained admin I have deleted the old admin account. So good job on however this got resolved :slight_smile:

1 Like