If I click the “Add to Places” on the menu, will it be considered permanently mounted? If not, what’s the proper way to mount this network share drive? Do I need to create an entry on the /etc/fstab?
Thank you.
If I click the “Add to Places” on the menu, will it be considered permanently mounted? If not, what’s the proper way to mount this network share drive? Do I need to create an entry on the /etc/fstab?
Dolphin is a file-manager. If you add a folder to “Places” in it, it will appear in Dolphin under Places on it’s left bar. Nothing else.
Mounting (drives, folders, or network-shares) during the boot-process is a whole different thing.
It is done in the file /etc/fstab
, see:
https://wiki.archlinux.org/title/Fstab , and
https://wiki.archlinux.org/title/Fstab#Tips_and_tricks
Here’s an online-guide with example to mount a samba-share on Linux with fstab:
If you will take a look here .
I have dealt with similar issues in this topic. there exists a solution there with entry in /etc/fstab
Best way for that would be to utilize /etc/fstab
. I was struggling with that some time ago, so please find a line that finally worked for me. In my case it cooperates well with ksmbd of OpenWrt.
//192.168.150.1/myshare /mnt/myshare cifs vers=3.0,nobrl,domain=lan,username=username,password=usernamepassword,x-systemd.automount,x-systemd.requires=network-online.target,_netdev,uid=1000,gid=1000,rw 0 0
Some additional hints:
What’s rationale of mounting the network share under /mnt instead of other places under /home/USER? If I just need that particular user to access it…
Your UID and GID is the same, but mine is off by 1 (UID=1000 but GID is 1001). Do you know why?
In your case, did you have to change the dir. permission attribute of /myshare? I tried to chmod 777 in my case but it didn’t change. Plz see screenshot below.
Ad. 1 it’s just a convention I follow to mount everything in /mnt
; I’m the only one using OS, so for me it’s fine;
Ad. 2 I reflected what I have on server side for user intended for SMB share; you should apply your G/UIDs;
Ad. 3 Nope, I left it as it was by default with root ownership and its permissions; you should manage ownership and permissions on server side, not locally on client in mounted catalog I guess.
Sometimes setting up autologin with Calamares does this.
You should use chown
for this, not chmod
.
sudo chown apache:apache /mnt/pi4gshare
As mentioned, having ownership of this directory will not grant you access to the share on the server–you will have to straighten that out on the server. You can stick a cred=
line in the /etc/fstab
entry if it is not an open share.
Thank you. If I don’t specify the “vers=3.0”, which version will the system default to? What’s the latest version?
Technically, the default depends on the kernel version of the client. If the kernel version is 4.13 or later, the default version is 3.0. If the kernel version is earlier than 4.13, the default version is 1.0.
The most common reason for specifying this option would be for compatibility with the server you are connecting to. For example, if the server you are connecting to only supports a specific version of the protocol, you would need to specify that version in order to access the server’s files.
The different versions have different security and performance implications as well. In general, the newer versions are better, so you should try to use the most recent version you can.
I believe it is 3.1.1 although I am not certain.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.