Accessing NAS shared folders

I have a question regarding accessing my Synology NAS from OS. I store all my data on my NAS and use Samba to access it’s shared folders by Dolphin by typical “smb://19.168.1.XX/Shared folder”, which works fine. The good thing about this is I can use the NAS username(s) to connect and then got the rights I have set in the NAS.

What is not great is that I am not allowed to create new documents on the NAS from inside an application, I have to first save it to a local folder and then use Dolphin to move it to the NAS. I also have problem with opening recently used files from within a program for instance a spreadsheet in Calc, open it from Dolphin works. Apart from this all works good, but these minor issues is a little annoying in the long term.

Is there a way to improve the Samba connection to solve this? I also think I just don’t understand thus run/user/… thing so if some have an high level explanation about that it might help.

I know NFS is an alternative, but it seems way more complicated and I did never understand if I still could use the NAS user to connect, so I gave up on that.

Operating System: openSUSE Tumbleweed 20240309
KDE Plasma-versjon: 5.27.10
KDE Frameworks Version: 5.115.0
Qt-versjon: 5.15.12
Kjerneversjon: 6.7.7-1-default (64-bit)
Graphics Platform: X11
Prosessorer: 12 × AMD Ryzen 5 7600 6-Core Processor
Minne: 30,6 GiB Ram
Graphics Processor: AMD Radeon Graphics
Manufacturer: ASUS

You need to mount the share properly so that your app can access the local mount point.

1 Like

Smb4K may be another option for casual user mounting…

1 Like

Thanks for your reply, makes sense. I have been into modifying the fstab many years ago, will read up and repeat on that now and try that first. I first started with other distros before I ended up with OS, and I am pretty sure it worked there without permanent mounting or maybe the actual file manager did the mount?, I guess that is why I expected it to work here as well, but also in Windows it would be typical to map a shared folder to a drive letter.

Yes, Dolphin does not work like that. Instead, it uses an SMB kio client, similar to smbclient (using libsmbclient in fact). GNOME file manager uses gvfs, which effectively mounts shares as a user AFAIR.

That’s why I suggested Smb4K for user-mounting.

1 Like

BTW, this article may be of interest to you…

1 Like

That explains exactly what I have missed.

…will have a look into it.

Perfect, thanks.

I did not find the smb4k application, but I added a few lines to the /etc/fstab and my shared Samba folders now shows up after reboot, but all seems read only. I have specified username and password in the fstab file, so how can I achieve the rights defined on the NAS?

Could you share the current fstab line for SMB mount?

//192.168.1.XX/Dokumenter /mnt/nas/Dokumenter cifs username=XXXXX,password=XXXXX 0 0

Try adding uid and gid options to the fourth column:

Sorry might need some more details on this, is the UID and GID the username / group name on the nas or my username on my OS PC?

UID/GID must be for the user on your client machine (not NAS).

I added UID and GID but no change, anyhow when I list a folder on the mounted share all files and directories are owned by root.
drwxr-xr-x 2 root root
When I created the /mnt/nas/shared folders it was as su.

That should not happen when specifying the UID and GID.
Please share the updated fstab entry and make sure you’ve unmounted/remounted the share!

Edit: Perhaps try the forceuid and forcegid options along with the uid,gid.

// /home/grro/Documents/Nas/Dokumenter/ cifs user=XX,password=PPPPPP 1000 1000
I found the UID in Yast> users.
All files still owned by root

I use umount /mounted folder and mount -a after any modification in fstab

If I skip the user and password, it asks for root password when I mount it.

The right spelling is uid=1000 and gid=1000

// /home/grro/Documents/Nas/Dokumenter/ cifs user=XX,password=PPPPPPP uid=1000 gid=1000

results in this
mount: /etc/fstab: parse error at line 13 – ignored


:+1: :+1: :+1:

That worked.

Thanks a lot for the help, very much appreciated.