Set a Firm Expiration Limit for ownCloud Public Links

To cap how long users can leave public links active, sign in as an ownCloud administrator and open Settings > Admin > Sharing. Under the public-link settings, enable Set default expiration date of public link shares, enter the number of days, and also enable Enforce as maximum expiration date. The first option supplies the default; the second prevents users from choosing a later date. They can still choose a shorter lifetime.

This procedure applies to ownCloud Server Classic (the 10.x interface documented for Server 10.16). Menu wording and the exact layout can vary by installed version, theme, or additional sharing apps. It does not describe ownCloud Infinite Scale, whose sharing interface and administration are different.

Do I need a default, or a hard maximum?

Choose a default only if users should normally get a suggested expiry but may extend or remove it. Choose the default and enforce it as the maximum when public links must not outlive a policy limit. ownCloud’s administrator manual defines the checkbox as limiting the maximum expiration date to the default, while allowing an earlier date.

For example, if the administrator sets 14 days and enables the maximum, a user creating a public link should receive an expiry about 14 days out and must not be able to extend it to 30 days. A user can choose a shorter period for a one-time handoff. If the maximum checkbox is off, the 14-day value acts as a starting value, not an upper bound.

ownCloud Classic administration screen with Sharing selected in the administration navigation and the sharing settings page open
The ownCloud Classic Administration navigation with Sharing selected, where public-link rules are configured.

How do I set the public-link limit?

  1. Sign in with an administrator account. A regular user may manage links they own, but cannot change the instance-wide sharing policy.
  2. Open the Sharing administration page. In the web interface, use Settings, then Admin, then Sharing. The ownCloud 10.16 administration manual identifies this page as the place for general sharing policy.
  3. Confirm link sharing is allowed. If this instance permits public links, the setting Allow users to share via link should be enabled. Do not turn it on just to change expiry if your organization intentionally disables public links.
  4. Enable the default expiry. Find Set default expiration date of public link shares. Check it and set the day count in the expiry field revealed by the setting. Set the limit your organization actually needs; ownCloud does not prescribe one universal number.
  5. Enforce that day count as the maximum. Check Enforce as maximum expiration date in the public-link expiration controls. Read the label carefully: similar options elsewhere govern user, group, or remote shares, not public links.
  6. Apply the change. Use the page’s save control if your installed interface presents one; otherwise verify that the setting remains enabled after navigating away and returning. Avoid changing unrelated password, upload, or permission controls while making this change.
ownCloud Classic Sharing settings showing Set default expiration date of public link shares checked and an example lifetime of 14 days
The public-link default is enabled with an example 14-day period; choose a value that matches your own sharing policy.
ownCloud Classic Sharing settings showing the public-link default and Enforce as maximum expiration date both enabled
Enabling the maximum rule makes the configured period a cap while permitting earlier expiry dates.

What happens to links that already exist?

Do not assume this policy shortens every public link that was created earlier. The manual describes a default applied to public link shares and does not clearly state that changing the setting retroactively rewrites existing share records. Audit existing links separately: open the file or folder’s Sharing panel, inspect each entry under Public Links, and set a compliant date or delete a link that should no longer work. ownCloud supports multiple public links for one file or folder, so checking only one link can miss others.

A public link’s expiry is effective at the end of the specified day, according to the server’s time. This means a link does not necessarily stop working at the exact hour it was created plus the selected number of 24-hour periods. Consider the instance time zone when explaining the deadline to recipients.

ownCloud Classic file Sharing sidebar showing Public Links and an enabled Expires date field for an individual link
The Sharing panel exposes an individual public link’s Expires field, which administrators can review when auditing existing links.

Why can a user still choose a different date?

First confirm that you enabled the maximum option in the public link section, not the neighboring controls for user or group shares. Then return to the admin page and confirm the checkbox persisted. Test with a non-admin account by creating a temporary link to a non-sensitive test file; never use confidential content for a policy test.

Next check whether an installed app adds expiration rules. The optional Share Link Password Policy app, for example, can define different link lifetimes depending on whether a link has a password. Enterprise classification and policy-enforcement features can also apply separate rules. These additions may affect what users see, so inspect the documentation for the exact app version installed and avoid assuming that the built-in checkbox is the only active policy. Do not edit database rows or patch ownCloud code to bypass a policy.

How can I verify the cap?

  1. Use a non-admin test account and create a public link for a disposable file.
  2. Check that ownCloud assigns an expiry date based on the configured number of days.
  3. Try to change the date to one later than the cap. Confirm the interface rejects the later value or otherwise prevents saving it; if not, stop and inspect app policies and server version before relying on the setting.
  4. Set a shorter date and confirm that it can be saved.
  5. After expiry, verify access in a private browser session that is not signed in. The link should no longer expose the shared content.
  6. Review older public links individually and record any that need a shorter expiry or removal.

If the result differs, capture the ownCloud Server version and enabled sharing-policy apps before troubleshooting. The labels and behavior can vary with app versions, and a policy rule can be more specific than the global setting.

Official documentation

Leave a Comment

Set a Firm Expiration Limit for ownCloud Public Links

Set a Firm Expiration Limit for ownCloud Public Links

Make public link expiration mandatory in ownCloud Classic, set a maximum lifetime, and check existing shares that may need separate cleanup.

Add TOTP Two-Factor Login to ownCloud Infinite Scale with Keycloak

Add TOTP Two-Factor Login to ownCloud Infinite Scale with Keycloak

Enable TOTP through Keycloak, enroll users safely, and understand when Infinite Scale’s route-level MFA settings apply.

Restore ownCloud Sync by Matching the Client to Your Server

Check whether the issue is an OC10 and 7.x compatibility break or a damaged CSync journal, then apply the right fix without deleting synced files.

Put ownCloud on HTTPS with Let’s Encrypt and Nginx

Put ownCloud on HTTPS with Let’s Encrypt and Nginx

Choose HTTP-01 or DNS-01, configure an ownCloud reverse proxy, and verify Certbot renews HTTPS certificates automatically.

Connect ownCloud Infinite Scale to LDAP for User Sign-In

Configure oCIS LDAP sign-in, align user and group lookups, and verify TLS and schema settings before rollout.

Connect an S3 Bucket to ownCloud 10 as External Storage

Connect an S3 Bucket to ownCloud 10 as External Storage

Add an Amazon S3 bucket to ownCloud 10, prepare compatible credentials and endpoints, and check access without confusing a mount with primary storage.

Automate ownCloud Database Dumps with a Safe Nightly Cron Job

Automate ownCloud Database Dumps with a Safe Nightly Cron Job

Schedule protected MariaDB dumps for ownCloud Server, handle maintenance mode safely, and verify each backup before relying on it.

Move ownCloud Classic to oCIS with a Supported Migration

Plan an ownCloud 10 to oCIS migration with the supported app, ordered commands, identity checks, and a clear list of data that needs separate handling.

Brand ownCloud Classic 10 with a Theme App and CSS

Replace ownCloud Classic 10 logos and tune web UI colors with a theme app, while avoiding upgrade and integrity-check pitfalls.

Set Default Storage Quotas by User Role in ownCloud oCIS

Set Default Storage Quotas by User Role in ownCloud oCIS

Assign byte-based storage limits to new ownCloud Infinite Scale users by role, with a proxy.yaml example and a safe verification checklist.