-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
Expected behavior
Nextcloud should be able to mount external SMB shares.
Current behavior
Nextcloud seems not able to always mount an external SMB share, provided via a Samba server, in a reliable way. The usual square in front of the share is displayed, which indicates an authentication problem, although all required information have been entered correctly. On top of the external mount screen the message "Verbindung zum Server verloren" (lost connection to server) is shown for a short moment.
I've double-checked that libsmbclient is installed and activated on the web server as recommended in other postings. Additionally I've tested access to the share using the smbclient command line tool:
# smbclient //192.168.1.11/Tmp -U "juergen"
Additionally I've written a small PHP script to check if the given SMB share can be accessed properly using the smbclient functions:
<?php
// Create new state:
$state = smbclient_state_new();
// Initialize the state with workgroup, username and password:
smbclient_state_init($state, '', 'juergen', 'XXXXX');
// Open a directory:
$dir = smbclient_opendir($state, 'smb://192.168.1.11/Tmp');
// Loop over the directory contents, print each node:
while (($entry = smbclient_readdir($state, $dir)) !== false) {
echo "{$entry['name']} : {$entry['type']}<br>\n";
}
// Close the directory handle:
smbclient_closedir($state, $dir);
// Free the state:
smbclient_state_free($state);
?>
Everything works fine, except that it doesn't work from within Nextcloud :-( No error messages are shown in the Nextcloud log or elsewhere which gives a hint about the possible root cause of the problem.
Due to the fact that problems with external mount points appears very often I would recommend to add a kind of diagnosis function to each external mount function which allows double-check the base requirements and shows detailed information, including all steps of a mount attempt.
BTW: I've managed to created several identical mount configurations within seconds only by editing the SMB mount options of my test share. It seems that there is another issue with the external mount configuration dialog itself.
Steps to reproduce
- In my closed environment it is easy, but most likely in your test it isn't.
Environment
Server Configuration
OS: Linux 3.16.47
Web server: Apache2 2.4.26
PHP version: 5.6.29
Database: MariaDB 10.0.32
Nextcloud version: 12.0.3
Client Configuration
Browser: Mozilla Firefox 55.0.3
Operating system: Windows 7