Error 401 - Public Shares

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 29.0.11
  • Operating system and version (e.g., Ubuntu 24.04):
    • AlmaLinux 8.10
  • Web server and version (e.g, Apache 2.4.25):
    • Apache/2.4.37 (AlmaLinux)
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • replace me
  • PHP version (e.g, 8.3):
    • 8.2
  • Is this the first time you’ve seen this error? (Yes / No):
    • YES
  • When did this problem seem to first start?
    • After OS update

Summary of the issue you are facing:

If we share a public link we cannot view any Pictures, PDF and in some cases Uploads are not possible anymore.

In this cases we get an 401 Error and in the Browser a login mask appears.
From the Dev-Tools it looks like a problem with DAV.
I have updated my Cloud from 28.0.14 to 29.0.11 but the error still appears.
Even a Downgrade to 28.0.0 dont help.

I guess it seems to be an Error with PHP oder Apache?
Can anyone help?

Configuration

$CONFIG = array (
‘instanceid’ => ‘xxxxxxxxxxxxxxxxxxxxxxx’,
‘passwordsalt’ => ‘xxxxxxxxxxxxxxxxxxxxxx’,
‘secret’ => ‘xxxxxxxxxxxxxx’,
‘trusted_proxies’ =>
array (
0 => ‘192.168.xx.xx’,
1 => ‘192.168.xx.xx’,
2 => ‘127.0.0.1’,
),
‘trusted_domains’ =>
array (
0 => ‘xxxxxxx’,
1 => ‘xxxxxxxx’,
2 => ‘xxxxxxxxx’,
3 => ‘xxxxxxxm’,
),
‘onlyoffice’ =>
array (
‘jwt_secret’ => ‘xxxxxxxxxxxxxx’,
‘jwt_header’ => ‘AuthorizationJwt’,
),
‘allow_local_remote_servers’ => true,
‘datadirectory’ => ‘/media/sdb/ocdata’,
‘overwrite.cli.url’ => ‘xxxxxxx’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘29.0.11.1’,
‘dbname’ => ‘xxxxxxxx’,
‘dbhost’ => ‘localhost’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘xxxxxx’,
‘dbpassword’ => ‘xxxxxxxx’,
‘logtimezone’ => ‘UTC’,
‘installed’ => true,
‘enable_previews’ => true,
‘filelocking.enabled’ => ‘true’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
‘timeout’ => 0.0,
‘password’ => ‘xxxxxxxxxx’,
),
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘theme’ => ‘’,
‘ldapIgnoreNamingRules’ => false,
‘maintenance’ => false,
‘mail_smtpmode’ => ‘smtp’,
‘mail_from_address’ => ‘cloud’,
‘mail_domain’ => ‘xxxxxxx’,
‘mail_smtphost’ => ‘xxxxxxxxx’,
‘mail_smtpport’ => ‘25’,
‘loglevel’ => 2,
‘filesystem_check_changes’ => 0,
‘appstore.experimental.enabled’ => true,
‘trashbin_retention_obligation’ => ‘auto’,
‘ldapProviderFactory’ => ‘\OCA\User_LDAP\LDAPProviderFactory’,
‘mysql.utf8mb4’ => true,
‘activity_expire_days’ => 90,
‘default_phone_region’ => ‘DE’,
‘mail_sendmailmode’ => ‘smtp’,
‘data-fingerprint’ => ‘xxxxxxxxxxxxxxxxxxx’,
‘sharing.outgoing_server2server_share_enabled’ => true,
‘app_install_overwrite’ =>
array (
0 => ‘ocdownloader’,
1 => ‘ncdownloader’,
),
‘maintenance_window_start’ => 1,
);

Apps

Enabled:

  • activity: 2.21.1
  • admin_audit: 1.19.0
  • circles: 29.0.0-dev
  • cloud_federation_api: 1.12.0
  • comments: 1.19.0
  • contactsinteraction: 1.10.0
  • dav: 1.30.1
  • drawio: 3.0.3
  • external: 5.4.1
  • federatedfilesharing: 1.19.0
  • federation: 1.19.0
  • files: 2.1.1
  • files_downloadlimit: 2.0.0
  • files_external: 1.21.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
  • ncdownloader: 1.0.21
  • notifications: 2.17.0
  • oauth2: 1.17.1
  • onlyoffice: 9.5.0
  • password_policy: 1.19.0
  • photos: 2.5.0
  • polls: 7.2.9
  • privacy: 1.13.0
  • provisioning_api: 1.19.0
  • recommendations: 2.1.0
  • related_resources: 1.4.0
  • serverinfo: 1.19.0
  • settings: 1.12.0
  • sharebymail: 1.19.0
  • support: 1.12.0
  • survey_client: 1.17.0
  • systemtags: 1.19.0
  • theming: 2.4.0
  • twofactor_backupcodes: 1.18.0
  • twofactor_email: 2.7.4
  • twofactor_totp: 11.0.0-dev
  • updatenotification: 1.19.1
  • user_saml: 6.5.0
  • user_status: 1.9.0
  • viewer: 2.3.0
  • weather_status: 1.9.0
  • workflowengine: 2.11.0
    Disabled:
  • bruteforcesettings: 2.9.0 (installed 1.2.0)
  • dashboard: 7.9.0 (installed 7.0.0)
  • encryption: 2.17.0 (installed 1.1.0)
  • nextcloud_announcements: 1.18.0 (installed 1.17.0)
  • suspicious_login: 7.0.0
  • text: 3.10.1 (installed 3.9.2)
  • user_ldap: 1.20.0 (installed 1.20.0)