Can't mount SMB folder

Hi, I'm trying to mount a folder from a NAS with fstab, but the target folder is still empty. Anyone would have a guide or something for someone that never touched Bazzite (and Linux in general) for this please ? ;_; Thank you !
59 Replies
nagito || Knight of Emilia
what have you tried so far?
Megguido
MegguidoOP3w ago
sudo vim /etc/fstab
sudo vim /etc/fstab
then added a line
//<IP>/<folder> /var/home/user/<target folder> cifs username=username,passeword=password 0 0
//<IP>/<folder> /var/home/user/<target folder> cifs username=username,passeword=password 0 0
The folder under "Distant" has the same orange disconnected icon as unmounted drives
nagito || Knight of Emilia
what happens when you sudo mount -a
Megguido
MegguidoOP3w ago
The icon is now green, but the folder is still empty :(
nagito || Knight of Emilia
hmm does mount -a say anything?
Megguido
MegguidoOP3w ago
Wait it popped when I closed and reopened dolphin I don't know what mount -a does but it looks like it worked
nagito || Knight of Emilia
mount -a mounts everything that's in fstab same thing that happens at boot
Megguido
MegguidoOP3w ago
Oh so it would have worked if I rebooted
nagito || Knight of Emilia
what? you didn't reboot?
Megguido
MegguidoOP3w ago
No :dead:
nagito || Knight of Emilia
yeah if you reboot it should work
Megguido
MegguidoOP3w ago
Imma do that just to make sure everything works Thanks a lot for the help Though it looks like this is read-only
nagito || Knight of Emilia
try adding ,rw after password=password those comma separated values are mount options the rw option mounts as read write
Megguido
MegguidoOP3w ago
Then I can use mount -a to refresh or do I need to restart ?
nagito || Knight of Emilia
-a should refresh i think
Megguido
MegguidoOP3w ago
Still in read only
Megguido
MegguidoOP3w ago
But this is fine for now, i'll mostly use it to backup files from windows
nagito || Knight of Emilia
so it's not mounted read only the other thing that could be a problem is a simple permission issue who's the owner of the folder you can't edit?
Megguido
MegguidoOP3w ago
I will double check the credentials i used can write on this folder, from the nas permissions It has the permission for rw on the nas' side
nagito || Knight of Emilia
what about client side? if you right click the folder go to properties > permissions what does it say?
Megguido
MegguidoOP3w ago
Sorry I went back to W11 to backup stuff. It'll take some time to copy everything, I'll check the properties tomorrow afternoon :dead: It says user and group : root
nagito || Knight of Emilia
sudo chown $USER:$USER /path/to/folder -R your user is definitely who should own the folder oh seems like CIFS doesn't support Linux/unix style permissions so chown may not work like normal but what should work is just setting ownership/permissions in fstab
Megguido
MegguidoOP3w ago
How do you do that in fstab ?
nagito || Knight of Emilia
there are options for this uid & gid if you just run id that'll give you your user's gid & uid though those are by default both 1000
Megguido
MegguidoOP3w ago
So i just add uid=1000,gid=1000 ?
nagito || Knight of Emilia
uid & gid i probably misspelled uid but yeah that you did mention using a NAS it's probably better to also serve files over NFS along with SMB NFS is pretty well supported in Linux/Unix land it unlike SMB does support normal permissions
Megguido
MegguidoOP3w ago
I can try that too Am a total linux noob sorry :notlikeduck:
nagito || Knight of Emilia
i mean CIFS should work too if mounted correctly NFS is just more Linux friendly to where you can actually have your main system drive be NFS so you can set things up in such a way that a machine can boot with no storage on there
Megguido
MegguidoOP3w ago
Looks like it can't mount in the same folder as before
mount.nfs: an incorrect mount option was specified for /var/home/<folder>
mount.nfs: an incorrect mount option was specified for /var/home/<folder>
Megguido
MegguidoOP3w ago
Ok there was a typo
Megguido
MegguidoOP3w ago
Now I get an access denied :issou: Guess I have to set this up on the NAS permissions
nagito || Knight of Emilia
what tells you acce denied?
Megguido
MegguidoOP3w ago
sudo mount -a mount.nfs : access denied by server while mounting <IP>
nagito || Knight of Emilia
oh hmm NFS? it's referencing NFS if nfs worked you wouldn't need to set perms at mount time doing this should only be needed with cifs
Megguido
MegguidoOP3w ago
:dead: Either the path was uppercase sensitive Or setting the client to IP instead of name worked better It works now but it only lets me in if I go in admin mode
nagito || Knight of Emilia
hmmmmmmm the mountpoint itself has to have the correct permissions as well
Megguido
MegguidoOP3w ago
It says user : root in properties
nagito || Knight of Emilia
for example here's my downloads folder
No description
nagito || Knight of Emilia
you either have to be the owner of a folder or be a member of a group that has view access or other has to have view access
Megguido
MegguidoOP3w ago
This is weird, the folder's permissions switch to root from current user when it's mounted
nagito || Knight of Emilia
weird there's probably something we're missing here what if you try changing owner after it's nounted?
Megguido
MegguidoOP3w ago
No description
Megguido
MegguidoOP3w ago
I don't get why i'm not the owner of the folder
nagito || Knight of Emilia
whoever creates a folder is the user by default do the other folders inside the main one have correct perms?
Megguido
MegguidoOP3w ago
I create a folder, then mount a NAS folder on it, then it becomes admin only
nagito || Knight of Emilia
they should
Megguido
MegguidoOP3w ago
No description
Megguido
MegguidoOP3w ago
From a random folder inside the mount point
nagito || Knight of Emilia
hmm is the uid in fstab yours?
Megguido
MegguidoOP3w ago
Uh do I have to set the uid with nfs ?
nagito || Knight of Emilia
group does seem changed me am confuzzled
Megguido
MegguidoOP3w ago
Found it Guess I should read the documentation from synology sometimes :dead:
Megguido
MegguidoOP3w ago
No description
Megguido
MegguidoOP3w ago
Mapped all users to admin, it works now idk how to change uid/gid on the NAS itself Alright, thank you @nagito || Knight of Emilia for your inconditional support :bloblove: Guess the issue is solved now
nagito || Knight of Emilia
seems like you'd need to create a NFS user for your uwer on the NAS side & give it access ideally you'd have permissions
but if it works it works i guess
Megguido
MegguidoOP3w ago
Good enough for now o7

Did you find this page helpful?