Nextcloud-snap: Missing SMB support

Created on 6 May 2018  Â·  23Comments  Â·  Source: nextcloud/nextcloud-snap

By default, external SMB shares are not accessible when installing the Nextcloud snap. Please publish steps to include SMB or add support to the snap.

Most helpful comment

I am sharing data on an SMB / CIFS share using the snap by mounting the share in /etc/fstab for now.

All 23 comments

Yeah, we did try to add SMB support last year, but there were some problems
https://github.com/nextcloud/nextcloud-snap/issues/272 https://github.com/nextcloud/nextcloud-snap/pull/263

Maybe we should try again now...

@pachulo want to take another run at that, see if things have changed?

hey! yeah, I was thinking about that, but wanted to wait till the update to 13.x was done...anyway, I will try to find some time this week!

Waiting for v13 is fine, too. Things will soon be fixed upstream for that, next point release I imagine.

I did try it again, but it seems that we won't be able to do it (without hackery) till snapcraft 2.43? is released witth your fix https://github.com/snapcore/snapcraft/pull/2112 for this kind of errors:

Failed to stage: Parts 'certbot-nextcloud-plugin' and 'libsmbclient' have the following files, but with different contents:
    usr/lib/python2.7/UserString.py
    usr/lib/python2.7/base64.py
    usr/lib/python2.7/cProfile.py
    usr/lib/python2.7/cgi.py

...

I think that you will have to wait for somebody to integrate it into the snap @tomharristech :(

I am sharing data on an SMB / CIFS share using the snap by mounting the share in /etc/fstab for now.

@skewty How exactly are you doing this? I have a CIFS share mounted on /mnt/cloud and want it to be accessible in the cloud, but the external storage thing stays red. I mounted it with dir_mode and file_mode 0770, but to no avail.

Any ideas?

Okay, solved. To answer my own question: I need to mount the CIFS share under /media/xxxx. If I mounted it under /mnt/xxxx, it failed - even after running snap connect nextcloud:removable-media. But a CIFS mount under /media did the trick.

Indeed, the removable-media plug only covers things in /media.

I am sharing data on an SMB / CIFS share using the snap by mounting the share in /etc/fstab for now.

I have mounted the share as followed, nextcloud connects to the local /media/nas, but it does not show any file or folder. When I navigate via terminal into /media/nas everything seems to work properly. Any idea how to fix this?

//192.168.1.52/share /media/nas cifs username=myusername,password=mypassword,iocharset=utf8 0 0

manually mounting the same share works great, using
sudo mount -t cifs //192.168.1.52/share /media/nas -o username=my_username,password=my_password

Nextcloud can see it and use it.

SMB Support would be nice ... "smbclient" is not installed. Mounting of "SMB / CIFS", "SMB / CIFS using OC login" is not possible. Please ask your system administrator to install it.

I get this error in the admin pannel --> external storage

NC installed via SNAP today
Installing php-smbclient does not do anything

did you try installing smbclient at the OS level?

example: sudo apt install smbclient

Sent from ProtonMail mobile

-------- Original Message --------
On Jul 3, 2019, 3:25 AM, BR0KK wrote:

SMB Support would be nice ... "smbclient" is not installed. Mounting of "SMB / CIFS", "SMB / CIFS using OC login" is not possible. Please ask your system administrator to install it.

I get this error in the admin pannel --> external storage

NC installed via SNAP today
Installing php-smbclient does not do anything

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

No i dint try that as i dont know how to mount it afterwards. On my Owncloud installs this feature is included and working ootb.

installing samba, smbclient and php-smbclient with a reboot didn do anything to fix this in nextcloud

SMB is a mayor feature that is missing from nc it needs to be implemented

Tried mounting the share via cli but that gives me errors too.... Premission errors 13 and sec=ntlmv

Would this even be permanent (reboot, shutdowns etc) and can i access this share via the nextcloud webinterface (noobie access not administrator "cli" access ... i need to be able to use it like a normal network share...)?
I'd like to switch to nextcloud and would also like to use smb (like im used to from owncloud). but it seems that this is an issue not beeing looked at atm?

Why is this (everything) so 'effin complicated with linux ?

I got the share mounted manually and via fstab (only) once and now it won't mount again.
I can update the the share to view my files but after the second reboot the share is empty.

"sudo mount -a" throws error 22 at me
Something about apparmour or premission denied
Is there a timeline for features to be added ?

I woud advise the devs of this repo to clearly state in the Readme that SMB is broken and not working in when you install via snap.

My fstab configuration is working without any problem on ubuntu 18.04 LTS.
I use the following entry in fstab: (you have to install cifs-utils first to get this working)

//hostname/SMB-Share /media/directory cifs vers=3.0,username=yourusername,password=yourpassword,iocharset=utf8,file_mode=0770,dir_mode=0770 0 0

I also enabled automatic refreshing for the mounted directories in the nextcloud external storage app.

Yay that worked thank you. I assume "filemode and dirmode" are premissions for the mountpoint?
Its works even after multiple reboots and powerdowns. Under "External Storage" i get a green light.
now i ned to obfuscate my passwords and im good to go

Would still be nice to have this feature automated with nextcloud snap

No problem!
Yes, "filemode and dirmode" are permissions for the mountpoint and are applied when accessing the mounted files. (https://linux.die.net/man/8/mount.cifs)
They are "must-haves" when mounting Windows-Network-Shares as these don't support the "unix extensions".

I agree that this functionality should definitely be included in the snap.
In the meantime a hint in readme.md would be nice.
And possibly a Wiki-Entry on how to configure it manually.

Any update on getting smb connectivity within the nextcloud snap? Yes, I could mount in fstab, but I'd rather not.

Dupe of #60

My fstab configuration is working without any problem on ubuntu 18.04 LTS.
I use the following entry in fstab: (you have to install cifs-utils first to get this working)

//hostname/SMB-Share /media/directory cifs vers=3.0,username=yourusername,password=yourpassword,iocharset=utf8,file_mode=0770,dir_mode=0770 0 0

I also enabled automatic refreshing for the mounted directories in the nextcloud external storage app.

If you got the mount error 95: (Operation not supported) try changing the version arg to 1.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mo-seph picture mo-seph  Â·  6Comments

pachulo picture pachulo  Â·  4Comments

tinokizis picture tinokizis  Â·  8Comments

MichaelsGITIGIT picture MichaelsGITIGIT  Â·  6Comments

RadZaeem picture RadZaeem  Â·  8Comments