Setting up default expiery date AND maximum exipery date not possible!

Setting up default expiry date AND maximum expiry date not possible!

Dear Nextcloud users, i have a problem with setting up the default expiry date and the Maximum expiry date.

my configs:

  • Nextcloud 33.0.16
    • Debian 13 (Linux 7.1.3+deb14-amd64 x86_64)

    • Apasche 2.4

    • PHP 8.4.23

    • Mysql 11.8.6

    • Bare Metal/Archive

$CONFIG = array (
'memcache.local' => '\OC\Memcache\APCu',
'distributed' => '\OC\Memcache\redis',
'memcache.locking' => '\OC\Memcache\redis',
'filelocking.enabled' => 'true',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),
'default_phone_region' => 'xx',
'passwordsalt' => 'xx',
'secret' => 'xx',
'datadirectory' => '/var/www/xx',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'private.xx.',
),
'dbtype' => 'mysql',
'version' => '33.0.0.16',
'overwrite.cli.url' => '``https://private.com``',
'dbname' => 'xx',
'dbhost' => 'xx',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'xx',
'dbpassword' => 'xx',
'installed' => true,
'ldapProviderFactory' => '\OCA\User_LDAP\LDAPProviderFactory',
'maintenance_window_start' => '1',
'maintenance' => false,
'app_install_overwrite' =>
array (
),
'mail_domain' => 'xx',
'mail_from_address' => 'xx',
'mail_smtpmode' => 'smtp',
'mail_smtphost' => 'localhost',
'mail_smtpport' => '25',
'mail_sendmailmode' => 'smtp',
'mail_smtpstreamoptions' =>
array (
'ssl' =>
array (
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
),
),
'loglevel' => 0,
'theme' => '',
'updater.secret' => 'xx',
'defaultapp' => 'files,dashboard',
'enforce_theme' => 'dark',
'instanceid' => 'xx',
);

Core app config

"lastupdatedat": xx,
"link_defaultExpDays": "31",
"moveavatarsdone": "yes",
"previewsCleanedUp": "1",
"public_files": "files_sharing/public.php",
"shareapi_default_internal_expire_date": "yes",
"shareapi_default_remote_expire_date": "yes",
"shareapi_enable_link_password_by_default": false,
"shareapi_internal_expire_after_n_days": "15",
"shareapi_remote_expire_after_n_days": "15",
"vendor": "nextcloud",

My problem :

When use the manual on ( File Sharing — Nextcloud 34 Administration Manual ) to set up a default and a maximum expiry date , It just doesnt work, for me . :confused:

i have tried many different things but the default expiry date for links always stays whats in the GUI( “shareapi_internal_expire_after_n_days”: “15”,“shareapi_remote_expire_after_n_days”: “15”,) specified.

the commands :

'occ config:app:set --value xx core internal_defaultExpDays
occ config:app:set --value xx core link_defaultExpDays'

change the config of the core app in nextcloud but it doesnt do anything…

i would really appreciate some help with this :slight_smile:

it may help to test one share type at a time here. internal_defaultExpDays is for shares to local users or groups, while link_defaultExpDays is for public link or email shares. remote shares use separate shareapi_remote_* settings.

for an internal share, could you check these values?

occ config:app:get core internal_defaultExpDays
occ config:app:get core shareapi_enforce_internal_expire_date
occ config:app:get core shareapi_internal_expire_after_n_days

for a public link, check these instead:

occ config:app:get core link_defaultExpDays
occ config:app:get core shareapi_enforce_expire_date
occ config:app:get core shareapi_expire_after_n_days

then create one new share of that same type. if the expiration field already shows 15 days before you save it, mention that too. that should help narrow down whether the value is coming from the web UI or the server config.

Before spending much time on this matter, make sure you are on a a newer maintenance release.

You are running 33.0.0.

Your instance is 7 (!) maintenance releases behind: