Problem to carry out dav:sync-system-addressbook perm issue

I did a journy this ween from v. 25.x.x to 29.0.2 so far so good up and running and everything working.

Config: Server: Synology DSM 7.2 The installation runs on PHP 8.2 and an Apache server 2.4 and accesses a Maria mysql database. The executing user is called http, the installation is under volume1/web/nextclout and the files are stored under volume1/NextCloud.

But since I like to have clean installations I am fighting already a day to get clear this installation warning:

  • The DAV system address book sync has not run yet as your instance has more than 1000 users or because an error occurred. Please run it manually by calling “occ dav:sync-system-addressbook”.

Well if I try this command I get all the time:
syno_admin@Tresor:~$ sudo -u http php82 /volume1/web/nextcloud/occ dav:sync-system-addressbook
Password:
Syncing users …
1 [->--------------------------]
In Folder.php line 403:

No delete permission for path “/appdata_ocrqheldgr6a/dav-photocache/4832fed3e4ec1dcda6fc86fe36e4c01a”

What I tried:

  1. reset of perm more than once, does nothing changed.
  2. Tried to remove manually on file system and DB the conflicting folder or files e.g. /appdata_ocrqheldgr6a/dav-photocache/4832fed3e4ec1dcda6fc86fe36e4c01a.
    After that you just get the warning for the next folder. endless story.
  3. filescans and repair, everything i.o

filescan:
±--------±------±----±--------±--------±-------±-------------+
| Folders | Files | New | Updated | Removed | Errors | Elapsed time |
±--------±------±----±--------±--------±-------±-------------+
| 2737 | 44662 | 0 | 153 | 0 | 0 | 00:13:23 |
±--------±------±----±--------±--------±-------±-------------+

repair:

  • Repair MySQL collation
    • All tables already have the correct collation → nothing to do
  • Clean tags and favorites
    • 0 tags of deleted users have been removed.
    • 0 tags for delete files have been removed.
    • 0 tag entries for deleted tags have been removed.
    • 0 tags with no entries have been removed.
  • Repair invalid shares
  • Move .step file of updater to backup location
  • Add move avatar background job
    • Repair step already executed
  • Add preview cleanup background jobs
  • Migrate oauth2_clients table to nextcloud schema
    • Update the oauth2_access_tokens table schema.
    • Update the oauth2_clients table schema.
    • Delete clients (and their related access tokens) with the redirect_uri starting with oc:// or ending with *
  • Fix potential broken mount points
    • No mounts updated
  • Repair language codes
  • Add log rotate job
  • Clear frontend caches
    • Image cache cleared
    • JS cache cleared
  • Clear every generated avatar
  • Add preview background cleanup job
  • Queue a one-time job to cleanup old backups of the updater
  • Cleanup invalid photocache files for carddav
  • Add background job to cleanup login flow v2 tokens
  • Remove potentially over exposing share links
    • No need to remove link shares.
  • Clear access cache of projects
  • Reset generated avatar flag
  • Keep legacy encryption enabled
  • Check encryption key format
  • Remove old dashboard app config data
  • Add job to cleanup the bruteforce entries
  • Queue a one-time job to check for user uploaded certificates
  • Repair DAV shares
  • Add background job to set the lookup server share state for users
  • Add token cleanup job
  • Clean up abandoned apps
  • Add possibly missing system config
  • Add AI tasks cleanup job
  • Queue a job to generate metadata
  • migrate lazy config values
  • Cache logo dimension to fix size in emails on Outlook
    • Theming is not used to provide a logo
  • Add cleanup-deleted-users background job
  • Upgrading Circles App
  • Fix component of birthday calendars
    • 4 birthday calendars updated.
  • Regenerating birthday calendars to use new icons and fix old birthday events without year
    • Repair step already executed
  • Fix broken values of calendar objects
    0 [->--------------------------]
  • Registering building of calendar search index as background job
    • Repair step already executed
  • Register building of social profile search index as background job
  • Registering background jobs to update cache for webcal calendars
    • Added 0 background jobs to update webcal calendars
  • Registering building of calendar reminder index as background job
    • Repair step already executed
  • Clean up orphan event and contact data
    • 0 events without a calendar have been cleaned up
    • 0 properties without an events have been cleaned up
    • 0 changes without a calendar have been cleaned up
    • 0 cached events without a calendar subscription have been cleaned up
    • 0 changes without a calendar subscription have been cleaned up
    • 0 contacts without an addressbook have been cleaned up
    • 0 properties without a contact have been cleaned up
    • 0 changes without an addressbook have been cleaned up
  • Remove activity entries of private events
    • Removed 0 activity entries
  • Clean up old calendar subscriptions from deleted users that were not cleaned-up
    0 [----->----------------------]
    • 0 calendar subscriptions without an user have been cleaned up
  • Remove invalid object properties
    • 0 invalid object properties removed.
  • Fix the share type of guest shares when migrating from ownCloud
  • Copy the share password into the dedicated column
  • Set existing shares as accepted
  • Update OAuth token expiration times
  • init metadata
  • Create help command
  • Invalidate access cache for projects conversation provider
    • Invalidation not required
  • Cache the user display names
  • Switches from default updater server to the customer one if a valid subscription is available
    • Repair step already executed
  • Send an admin notification if monthly report is disabled
  • Force-reset all Text document sessions
  • Initialize migration of background images from dashboard to theming app
  • Add background job to check for backup codes
  • Populating added database structures for workflows

Configuration PHP

$CONFIG = array (
‘instanceid’ => ‘o…’,
‘passwordsalt’ => ‘’,
‘secret’ => ‘a/qDSdF’,
‘trusted_domains’ =>
array (
0 => ‘bbbb.sen-eer.ch’,
),
‘datadirectory’ => ‘/volume1/NextCloud’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘29.0.10.1’,
‘overwrite.cli.url’ => ‘https://bbbb.sen-eer.ch’,
‘dbname’ => ‘NextCloud’,
‘dbhost’ => ‘localhost:/run/mysqld/mysqld10.sock’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘oc_sdfsdfsdfsdfsdf’,
‘dbpassword’ => ‘sdfhdfgshfgdhdfghfdghfgdhdfghfgdhdfghdfghdfg’,
‘installed’ => true,
‘maintenance’ => false,
‘theme’ => ‘’,
‘debug’ => false,
‘loglevel’ => 0,
‘updater.release.channel’ => ‘stable’,
‘app_install_overwrite’ =>
array (
0 => ‘occweb’,
),
‘mail_smtpmode’ => ‘smtp’,
‘mail_smtpsecure’ => ‘tls’,
‘mail_sendmailmode’ => ‘smtp’,
‘mail_from_address’ => ‘cloud’,
‘mail_domain’ => ‘bbbb.sen-eer.ch’,
‘mail_smtpauthtype’ => ‘LOGIN’,
‘mail_smtpauth’ => 1,
‘mail_smtphost’ => ‘bbbb.sen-eer.ch’,
‘mail_smtpname’ => ‘cloud’,
‘mail_smtppassword’ => ‘dfsdergtfdsgdfsghdfsgfshdfshdfghgdfhsdfcgf’,
‘mail_smtpport’ => ‘25’,
‘default_phone_region’ => ‘CH’,
‘maintenance_window_start’ => 2,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
);

Apps

  • activity: 2.21.1 - bruteforcesettings: 2.9.0 - calendar: 4.7.16 - circles: 29.0.0-dev - cloud_federation_api: 1.12.0 - comments: 1.19.0 - contacts: 6.0.1 - contactsinteraction: 1.10.0 - dashboard: 7.9.0 - dav: 1.30.1 - federatedfilesharing: 1.19.0 - federation: 1.19.0 - files: 2.1.1 - files_downloadlimit: 2.0.0 - files_pdfviewer: 2.10.0 - files_reminders: 1.2.0 - files_sharing: 1.21.0 - files_trashbin: 1.19.0 - files_versions: 1.22.0 - firstrunwizard: 2.18.0 - logreader: 2.14.0 - lookup_server_connector: 1.17.0 - nextcloud_announcements: 1.18.0 - oauth2: 1.17.1 - occweb: 0.2.0 - password_policy: 1.19.0 - photos: 2.5.0 - privacy: 1.13.0 - provisioning_api: 1.19.0 - recommendations: 2.1.0 - related_resources: 1.4.0 - richdocuments: 8.4.8 - richdocumentscode: 24.4.1002 - serverinfo: 1.19.0 - settings: 1.12.0 - sharebymail: 1.19.0 - spreed: 19.0.11 - support: 1.12.0 - survey_client: 1.17.0 - systemtags: 1.19.0 - tasks: 0.16.1 - text: 3.10.1 - theming: 2.4.0 - twofactor_backupcodes: 1.18.0 - updatenotification: 1.19.1 - user_status: 1.9.0 - viewer: 2.3.0 - weather_status: 1.9.0 - workflowengine: 2.11.0Disabled: - admin_audit: 1.19.0 - encryption: 2.17.0 - files_external: 1.21.0 - files_rightclick: 0.15.1 (installed 1.6.0) - notifications: 2.17.0 (installed 2.12.1) - onlyoffice: 9.5.0 (installed 9.5.0) - suspicious_login: 7.0.0 - twofactor_totp: 11.0.0-dev - user_ldap: 1.20.0

Tips for increasing the likelihood of a response

Does anyone have any idea?

Thank you all in advance!

1 Like

Who is the owner of the directory?

The http user with full perms

I tried:
chown -R http:http /volume1/NextCloud
sudo chmod -R 750 /volume1/NextCloud

Also:
sudo chown -R http:http /volume1/NextCloud/appdata_ocrqheldgr6a/dav-photocache
sudo chmod -R u+rwX /volume1/NextCloud/appdata_ocrqheldgr6a/dav-photocache

Futher checks:
lsattr /volume1/NextCloud/appdata_ocrqheldgr6a/dav-photocache/c4ff4f949287d801a3900de190c5008b

find /volume1/NextCloud/appdata_ocrqheldgr6a/ -name “@eaDir” -type d -exec rm -rf {} +