Share link Disappear/Not Found (External Storage)

Nextcloud version : 22.2.3
Operating system and version : Ubuntu 20.04.3
Apache or nginx version : 2.4.41
PHP version : 7.4.3

The issue you are facing:
Sharing link that user creates disappear after some time (1 hours)

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Share a file/folder with someone
  2. Wait some time
  3. The sharing link disappear and the link not working

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'dbtype' => 'mysql',
  'version' => '22.2.3.0',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'installed' => true,
  'logfile' => '/mnt/Storage01/NextCloud/data/nextcloud.log',
  'log_type' => 'file',
  'loglevel' => 2,
  'debug' => false,
  'app_install_overwrite' =>
  array (
    0 => 'files_frommail',
    1 => 'file_upload_notification',
    2 => 'admin_notifications',
  ),
  'maintenance' => false,
  'check_for_working_htaccess' => true,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'ldapUserCleanupInterval' => 60,
  'upgrade.automatic-app-update' => true,
  'singleuser' => false,
  'remember_login_cookie_lifetime' => 1296000,
  'session_lifetime' => 3600,
  'session_keepalive' => false,
  'trashbin_auto_expire' => true,
  'activity_expire_days' => 90,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'no_replay',
  'mail_smtpport' => '25',
  'mail_smtpauthtype' => 'LOGIN',
  'skeletondirectory' => '',
  'default_phone_region' => 'IT',
  'default_locale' => 'it_IT',
  'default_language' => 'it',
  'knowledgebaseenabled' => false,
  'defaultapp' => 'files',
  'enable_previews' => false,
  'quota_include_external_storage' => false,
);

Can you find some information in your logfile?

Perhaps you must change the loglevel first see documentation.

Hi , i have enabled
‘loglevel’ => 0,
but it keep spamming this
image

This is show when the link dissapear
image
Here the name of the folder appears

In your config-file, the variable
'datadirectory' => '/var/www/nextcloud/data',
is not defined. Did you delete it or is it really not there?

In the data folder, do you manually add, delete or change files directly?

Yes is defined , i accidentaly delete from the copy/paste

‘datadirectory’ => ‘/mnt/Storage01/NextCloud/data’,

for the nextcloud i dont touch the “data” folder , i use an external windows server to attach the external folder to the nextcloud (with the application “External Storage Support”)

Update :
It seems that is some kind of file shared in the folder (type or name lenght) .
Im trying to isolate individual folders to see if the sharing remains active.
For now it has been on for about 12h hours, I removed folders that contained many .p7m files (there are still some p7m shared files in that folder but apparently they don’t like these)

Is there any limitation on the nextcloud of file type or name length maybe?

The shared files are from the shared folder? Does the same happen if you share from the main storage?

Yes there were some limitations because on client side that can cause problems (mainly windows). Not sure if that was some 256 character length for the total path (Error reporting for too long filepaths (>255 chars) · Issue #9907 · nextcloud/server · GitHub). You’ll probably find more if you check the bug tracker in more detail (perhaps also worth checking the desktop client side as well).

The shared files/folder are in the External Storages , we use only External Storage attached to nextcloud.

The limitations are only for lenght name ? all type are allowed?

Update :
I tried to make a clone external storage with only the files and folder that the user want to share , i removed all folder with long files and that works.
The old external storage with the files (with long name) removed keep crashing after about one hour.
It seem that external storage folder can support only small amount of file ? or maybe is that Nextcloud cannot read the files in depth folder (size in pending)

The one up is the old external storage with many files inside
The one bottom is the new external storage with less files inside
image

I don’t know what to do, every user who tries to share something stops after a few hours.
Every tipe of sharing (Public link , Guest user , email link)
Our Company uses nextcloud as a substitute for WeTransfer but the sharing function doesn’t seem to work.
I dont know how to solve.
Log doesn’t help.
Maybe is the External storage not right to share large amount of files.