Mounting the own samba share automatically / Photos and Videos collection for Digikam


I’m almost done setting up my new desktop workstation with Manjaro, which also serves as a server, providing NFS-shares for other computers in the local network to backup to and providing SMB-shares for others to share or store files (both public and private share). Everything works so far, except one thing:

One Samba Share contains our 500 GB collections of pictures and videos, it is available to read for anybody on the LAN, but two users (my wife and I) can also write on it. So far so good… and working.
But the share is supposed to be used as source for the DigiKam photo management app on my computer, which provides the share also.

So my best idea so far is:
I mount the share (which is provided by myself) to my local Pictures directory. DigiKam uses this folder as source and can also write to it.

Problem is: I can’t mount the share in fstab, probably because it’s not available yet.
So after login I end up with an empty folder in ~/Pictures .

I’d like to share the mount as soon as it is available. I can do that manually. How should I solve this?

I also thought about a different approach: I’d love to use the pictures just locally without the need to mount the Samba share, which is probably faster. But then I get problems with the permissions, i.e. DigiKam writes new folder and files not as the required smbuser, but with my own user. Then those files in the share are not accessible to the other users in the house anymore.

I’d be happy to receive your good advices!

Best wishes

What about a symlink ?

I already thought about that. But I just don’t understand the concept yet. Maybe you can explain me using my case as an example?

You could also consider a bind mount. Whether you do it VIA systemd or fstab, you can automount it. I have quite a few of those:

sda           8:0    0   3.6T  0 disk
└─sda1        8:1    0   3.6T  0 part /mnt/4tb_backup
sdb           8:16   0   4.5T  0 disk
└─sdb1        8:17   0   4.5T  0 part /home/mirdarthos/virtualbox
nvme0n1     259:0    0 232.9G  0 disk
├─nvme0n1p1 259:1    0   500M  0 part /boot/efi
├─nvme0n1p2 259:2    0   7.8G  0 part [SWAP]
└─nvme0n1p3 259:3    0 224.6G  0 part /




a Symlink is just a “shortcut” to a file or directory. You link a destination to a source. I don’t know where the “sym” part comes in.

Edit #2:

Indeed, see here:

If you use Windows, you’ll recognize the function of a symbolic link in the structure called a “shortcut” – a text string that your OS automatically interprets and follows, pointing to another file or directory; this allows one file or directory to refer to another, on the same disk or different disks.

This is different from simply making a copy of the target file or directory because it doesn’t take up hardly any space, and instead of then having two different copies of the file, opening the symlink opens the target instead, and any changes are propagated to that target.

1 Like

Thank you for your ressourceful answer!
I will give the bind mounts a try.

Actually the symlink sounds like a more interesting solution, since there would be a great advantage when writing to the drive directly. But how can the permissions problem be solved? Isn’t DigiKam going to write with my user to the target location? How is that prevented?

  • A symbolic link is a pointer to a file or directory (in text form)

  • A hard link is is a pointer to a file or directory :wink: (in binary form)

From the manpage:
Symbolic links are files that act as pointers to other files. To understand their behavior, you must first understand how hard links work. :rofl:

Perhaps you can get ideas reading [root tip] [How To] Samba Server From Scratch


You may need to enable systemd-networkd-wait-online.service or NetworkManager-wait-online.service (depending on your setup) to proper enable booting on start-up.

See Samba#As_mount_entry

Not confusing at all. NOPE. :roll_eyes: