How to have my Samba share show in file directory

Hey all, whenever I save files in some applications, but not all, they’re using this very simplified browser explorer where I can only see folders listed on the hard drive for manjaro. The issue is that sometimes I access files from my samba share on a different computer, so it doesn’t let me navigate to that location, it’s only letting me see folders and the directory of the manjaro hard drive, but it doesn’t see flash drives, other hard drives, or network locations, but only when I’m trying to use an in app file explorer of some apps, any suggestions?

How and what did you configure?

not simple to understand :

mount network directories in fstab and after there are as local directory … ?

1 Like

I provided more detail in a different reply, but this is just in dolphin file manager, where I added a network location, by going to the network left hand side tab, and clicking add network folder, its a samba share I have on an ubuntu server, but it goes beyond that, in that these programs don’t even see mounted hard drives or flash drives, only the manjaro file structure on the manjaro hard drive.

For some reason the forum tells me I can’t insert picture, so I’ll type it out the best I can, in the ideal program, like my web browser, it functions well, so you aa file explorer where on the left you see your favorited items and can navigate freely
Places
Home
Desktop
Documents
Downloads
Trash
Nextcloud Data
Remote
Network
Home(The samba share I need)
Recent
…etc, I think I’ve made my point, you see hard drives, flash drives, network, everything, but in some programs like freeoffice, when you go to save or open a file, all you have access to is the manjaro drive, so this
/
bin
boot
dev
etc
home
lib
lib64
lost+found
mnt
opt
proc
root
run
sbin
snap
srv
sys
tmp
usr
var

So the issue is that I can’t access most of my storage unless I save the file somewhere and copy and paste there manually every single time. Idk if it’s an issue with the builtt in file browsers of certain programs, or if I need to configure something, but everything is mounted.

yes, i writed :

at boot we can mount smb directory (in /etc/fstab), after is display in all application as a local directory


new forum and not found smb/fstab tuto (only systemd)

yes the easy way is just like @papajoke mentioned. Use the /etc/fstab for permanent mount:

//SERVER/SHARE MOUNTPOINT cifs OPTIONS  0  0

it shoud look like this:

//192.168.178.10/share /home/<your username>/share cifs rw,guest,uid=1000  0  0

The you can access the folder /home/$USER/share

Do it first temoprary:

sudo mount -t cifs -o user=testuser,domain=testdomain //192.168.1.100/share /home/<your username>/share

Edit the command for your needs.

1 Like

Two questions, I wanted to copy and paste your command, I wasn’t super sure what to change to for testdomain, so I ran it as
domain=testdomain //192.168.50.112/home /home/james/share
and received this error Couldn’t chdir to /home/james/share: No such file or directory
so then I tried
domain=//192.168.50.112/home /home/james/share
and got this mount: /home/james/share: can’t find in /etc/fstab.
So I’m thinking the testdomain was the one to use, am I supposed to first create that share directory?

You need these 3 things:

username=USER
password=PASSWORD
domain=DOMAIN

domain is not needed if it is the default one.

Sorry it is not like copy&paste. You need to type in the correct information there.

Since i have no idea how you set it up, i can only give examples.

And yes you need to create that folder.

1 Like

Lots of information that is 100% correct and 100% confusing to a new user. :wink:

First read this:

Then read that:

https://wiki.manjaro.org/index.php?title=Fstab

then edit your fstab to ensure your Samba shares are mounted at startup and become visible inside your local file system :+1: (The standard to do that is inside /mnt or /media)

If you would run into specific issues trying that, please leave another message.

Looking at the information already provided, this would do what you want:

# Create NAS mountpoint
sudo mkdir /mnt/NAS
mount -t cifs //192.168.50.112/home /mnt/NAS -o username=james,password=JamesPassword,domain=WORKGROUP`

Where obviously james is the samba share’s username and JamesPassword, is that username’s password and WORKGROUP is the actual workgroup name

If that works, add the following line as the last line on your fstab:

//192.168.50.112/home /mnt/NAS cifs uid=1001, username=james,password=JamesPassword,domain=WORKGROUP`

and for old time’s sake reboot. In Linux you never need to reboot for anything, just execute mount -a and that should do the trick.
:innocent:

So I got the temporary way to work, but on startup the fstab didn’t work, I had to use a terminal based emergency mode, and I ended up just using vim to remove the line I added. Instead of using /mnt/NAS I’m using /home/james/home, what does “cifs uid=1000” do, I think that’s what it didn’t work but the temporary way to mount it did.

So I tried it again, and this time after restarting, I got to my desktop, but it didn’t mount, when I access the folder, in dolphin, it says An error occurred while accessing ‘/home/james/home’, the system responded: mount: /etc/fstab: parse error at line 12 – ignored mount: /home/james/home: can’t find in /etc/fstab.
This is what I have in fstab for it
//192.168.50.112/home /home/james/home cifs uid=1001, username=MY_USERNAME,password=MY_PASSWORD,domain=WORKGROUP

Add 0 0 at line end:

in “options”, I add nofail,noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev if server not run when i open my manjaro ( and wiki)

2 Likes

You use kde !
Other way to access to smb:// by local file system without fstab (use kio-fuse package):

If smb is mounted with dolphin, we can access by local directory:

/run/user/<USER-ID>/kio-fuse-***/smb/<IP-SERVER>

For test (and found directory): open smb directory in dolpin and open console by F4

1 Like

Can you explain a little bit with how that works, I’m not really sure how or what this is accomplishing?

We use fstab OR dolphin-smb://

kio-fuse package will automatically create a virtual directory on our machine after you manually mount your smb:// folder with dolphin.
So it will be accessible to all applications by /run/user/1001/kio-fuse-xxx/smb/ while with fstab you have /home/james/home/

So it’s another solution (without fstab/mount at boot) but:

  • no automatic smb mount
  • not a easy directory name to remember

Okay, so that works out of the box, and I like that, but I would rather get fstab to work better, it would automatically do it now that I vaguely understand how it works. With this kio method, I can navigate, to the folder, but I have to do a lot of clunky searching for the path, currently I found part of the solution was to get rid of a space but now I’m not getting write permission all the way so idk whether to settle for this or not.

in fstab you can add (for test) in options file_mode=0777,dir_mode=0777

1 Like

so the final line in fstab becomes:

//192.168.50.112/home /home/james/home cifs uid=1001, username=MY_USERNAME,password=MY_PASSWORD,domain=WORKGROUP,file_mode=0777,dir_mode=0777 0 0

:innocent:

P.S. @papajoke Oh drat! forgot about the 0 0! Thanks for helping out!

So i’ve found part of the problem, initially, was that I had a space during the options, and apparently, that’s not allowed. Anyways, I’ve got it kinda configured right, almost verbatim what you’ve been typing with all variations, and they all return this error. “mount.cifs: permission denied”, weirdest thing, If I run mount -a, I get that error, if I run sudo mount -a, no problem.