Cannot share folder with link

Nextcloud version (eg, 12.0.2): 12.0.5
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 7.1): 7.0.18

The issue you are facing:

When I access to the url of a shared a folder with link, it says that the folder does not exists. The logs shows some errors posted below.

Looking at the server, it’s correct that those file do not exist.

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

Steps to replicate it:

  1. Share a folder with a link
  2. Access the url provided

The output of your Nextcloud log in Admin > Logging:

require_once(): Failed opening required '/var/www/nextcloud/apps/files_sharing/publicwebdav.php' (include_path='/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/apps') at /var/www/nextcloud/public.php#76	2018-01-24T17:29:20-0300

Error	PHP	require_once(/var/www/nextcloud/apps/files_sharing/publicwebdav.php): failed to open stream: No such file or directory at /var/www/nextcloud/public.php#76

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

<?php
$CONFIG = array (
  'instanceid' => 'oc2c9f2e9f01',
  'passwordsalt' => 'xxxxxxxxxxx',
  'trusted_domains' => 
  array (
    0 => 'xxxxxxxxxxx',
    1 => '10.0.100.101',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '12.0.5.3',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'xxxxxxxxxx',
  'dbpassword' => 'xxxxxxxxx',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_from_address' => 'xxxxxxxx',
  'mail_domain' => 'gmail.com',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => true,
  'mail_smtpname' => 'xxxxx',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtppassword' => 'xxxxxxx',
  'theme' => '',
  'maintenance' => false,
  'secret' => 'xxxxxxx',
  'forcessl' => true,
  'loglevel' => 1,
  'updatechecker' => false,
  'overwrite.cli.url' => '/owncloud',
  'trashbin_retention_obligation' => 'auto',
  'updater.secret' => 'xxxxxxxxxx',
);

The output of your Apache/nginx/system log in /var/log/____:

[Wed Jan 24 17:29:20.507950 2018] [:error] [pid 1076] [client 10.0.100.254:44132] PHP Fatal error:  require_once(): Failed opening required '/var/www/nextcloud/apps/files_sharing/publicwebdav.php' (include_path='/var/www/nextcloud/3rdparty/pear/console_getopt:/var/www/nextcloud/3rdparty/pear/pear_exception:/var/www/nextcloud/3rdparty/pear/archive_tar:/var/www/nextcloud/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud/apps') in /var/www/nextcloud/public.php on line 76