Support intro
Sorry to hear you’re facing problems
help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
example
Or for longer, use three backticks above and below the code snippet:
longer
example
here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version (eg, 22.2.3): 22.2.3snap1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.3 LTS
Apache or nginx version (eg, Apache 2.4.25): Don't know how to find the version number of apache in this snap.
PHP version (eg, 7.4): Don't know how to find the version of php in this snap.
The issue you are facing:
Can’t access some folders in External storage, and discrepancy between documentation and reality.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Prepare a tree of files in /media/LTSync to access from NC via External storage (Local) and run the
sudo chown -R www-data /media/LTSync
command in the documentation. - Log in as the administrative account for NC and create the External storage (Local) link to the folder. The link fails completely.
- Repeat the command as
sudo chown -R root /media/LTSync
as stated by @szaimen : “The ownership needs to be root:root in case of the snap” in this conversation. - This time the link is made properly.
- Open Files within NC. Some folders within /media/LTSync show full contents (up to 18.1 GB) but others show zero.
(I didn’t do root:root because the files need to be writable by the adm group, so other programs can update them, and then NC can share them.)
Can anyone tell me why the snap version of NC needs the files to belong to root, while the standard version needs them to belong to the user that runs the web server, www-data.
And why is this requirement not documented anywhere? Is the documentation broken, or did I read the wrong files?
And another thing – the documentation for the standard version suggests I can use External storage (Local) to access a folder tree anywhere in the system, but according to @szaimen , the snap version can only access folders in /mnt or /media. (And that matches my experience.) Can anyone tell us why this is the case?
Thanks for thinking about these things,
Jim
The output of your Nextcloud log in Admin > Logging:
Error PHP Error: opendir(/media/LTSync/Spanish_win): Failed to open directory: Permission denied at /snap/nextcloud/28654/htdocs/lib/private/Files/Storage/Local.php#135
<<closure>>
OC\Log\ErrorHandler::onError()
/snap/nextcloud/28654/htdocs/lib/private/Files/Storage/Local.php - line 135:
opendir()
/snap/nextcloud/28654/htdocs/lib/private/Files/Storage/Common.php - line 879:
OC\Files\Storage\Local->opendir()
/snap/nextcloud/28654/htdocs/lib/private/Files/Storage/Wrapper/PermissionsMask.php - line 157:
OC\Files\Storage\Common->getDirectoryContent()
<<closure>>
OC\Files\Storage\Wrapper\PermissionsMask->getDirectoryContent()
/snap/nextcloud/28654/htdocs/lib/private/Files/Cache/Scanner.php - line 408:
iterator_to_array()
/snap/nextcloud/28654/htdocs/lib/private/Files/Cache/Scanner.php - line 388:
OC\Files\Cache\Scanner->handleChildren()
/snap/nextcloud/28654/htdocs/lib/private/Files/Cache/Scanner.php - line 340:
OC\Files\Cache\Scanner->scanChildren()
/snap/nextcloud/28654/htdocs/lib/private/Files/Cache/Scanner.php - line 510:
OC\Files\Cache\Scanner->scan()
/snap/nextcloud/28654/htdocs/lib/private/Files/Cache/Scanner.php - line 521:
OC\Files\Cache\Scanner->OC\Files\Cache\{closure}("*** sensiti ... *")
/snap/nextcloud/28654/htdocs/lib/private/Files/Cache/Scanner.php - line 509:
OC\Files\Cache\Scanner->runBackgroundScanJob()
/snap/nextcloud/28654/htdocs/lib/private/Files/Utils/Scanner.php - line 185:
OC\Files\Cache\Scanner->backgroundScan()
/snap/nextcloud/28654/htdocs/apps/files/lib/BackgroundJob/ScanFiles.php - line 89:
OC\Files\Utils\Scanner->backgroundScan()
/snap/nextcloud/28654/htdocs/apps/files/lib/BackgroundJob/ScanFiles.php - line 125:
OCA\Files\BackgroundJob\ScanFiles->runScanner()
/snap/nextcloud/28654/htdocs/lib/private/BackgroundJob/Job.php - line 51:
OCA\Files\BackgroundJob\ScanFiles->run()
/snap/nextcloud/28654/htdocs/lib/private/BackgroundJob/TimedJob.php - line 58:
OC\BackgroundJob\Job->execute()
/snap/nextcloud/28654/htdocs/cron.php - line 127:
OC\BackgroundJob\TimedJob->execute()
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$snap_current = getenv('SNAP_CURRENT');
$snap_data_current = getenv('SNAP_DATA_CURRENT');
$CONFIG = array(
/**
* Use the ``apps_paths`` parameter to set the location of the Apps directory,
* which should be scanned for available apps, and where user-specific apps
* should be installed from the Apps store. The ``path`` defines the absolute
* file system path to the app folder. The key ``url`` defines the HTTP web path
* to that folder, starting from the Nextcloud web root. The key ``writable``
* indicates if a web server can write files to that folder.
*/
'apps_paths' => array(
/**
* These are the default apps shipped with Nextcloud. They are read-only.
*/
array(
'path'=> $snap_current.'/htdocs/apps',
'url' => '/apps',
'writable' => false,
),
/**
* This directory is writable, meant for apps installed by the user.
*/
array(
'path'=> $snap_data_current.'/nextcloud/extra-apps',
'url' => '/extra-apps',
'writable' => true,
),
),
/**
* Database types that are supported for installation.
*
* Available:
* - sqlite (SQLite3 - Not in Enterprise Edition)
* - mysql (MySQL)
* - pgsql (PostgreSQL)
* - oci (Oracle - Enterprise Edition Only)
*/
'supportedDatabases' => array(
'mysql',
),
'memcache.locking' => '\OC\Memcache\Redis',
'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_SOCKET'),
'port' => 0,
),
'log_type' => 'file',
'logfile' => $snap_data_current.'/logs/nextcloud.log',
'logfilemode' => 0640,
);
The output of your Apache/nginx/system log in /var/log/____
:
PASTE HERE