How to open and write Libreoffice Writer files to a NAS using Samba

So…I’m a long-time Windows user who has dabbled in Linux for the last several years and finally made the full switch a week ago. During my transition process, I found I could not get Libreoffice Writer to see my personal TrueNAS server in order to open or save files. I was able to successfully mount my Samba shares from the TrueNAS box and access those shares via Dolphin, but they wouldn’t show up in LO Writer. After searching the internet for the last week, it appears this is a common problem. I finally found a solution and wanted to post it here, since I’m using Manjaro.

SOLUTION:
The typical advice for mounting is to mount to EITHER /mnt or /media, and initially I mounted my Samba shares to the /mnt directory; however, I discovered that if I mounted them in the /media folder, then the problem was solved.

Specifically, I was mounting my TrueNAS Samba shares within a folder called TrueNAS that was within the /mnt directory, but have now switched that to /media/TrueNAS.

I’m working with a fresh installation of Manjaro, and the default installation did not contain a /media folder, so I created one in the root directory (/):

cd /
sudo mkdir media
cd media
sudo mkdir TrueNAS

Next, to test the mounting strategy on a temporary basis, I used the following:

sudo mount -t cifs //192.168.10.103/NAS /media/TrueNAS -o username=my_username,password=my_password,workgroup=workgroup

where:
my TrueNAS IP and share: 192.168.10.103/NAS
where I want it mounted in Manjaro : /media/TrueNAS

As soon as I ran this command, my TrueNAS Samba shares appeared in Dolphin as well as in LO Writer when I launched it.

In order to make this permanent, I edited my /etc/fstab file and added the following to the very end, so it would run at startup:

#don't use this statement, use the next one
//192.168.10.103/NAS /media/TrueNAS cifs uid=1001,username=my_username,password=my_password,workgroup=workgroup

While this did work, and I could open files from my NAS share, I wasn’t able to write back to the share. Manjaro kept giving me the error that I didn’t have access to the share (or something to that effect). To solve that, I had to add the following permission options, file_mode=0777,dir_mode=0777 0 0 , to my fstab statement. So the final “correct” fstab statement is this:

//192.168.10.103/NAS /media/TrueNAS cifs uid=1001,username=my_username,password=my_password,workgroup=workgroup,file_mode=0777,dir_mode=0777 0 0

I’ve written this post in terms of a noob, since that’s what I am, and hopefully this helps other’s with the same problem.

Using systemd for mounts (I have one of these) and automounts (I also have one of these) works just as well, if not better and is another option, further proving that there’s usually more than one way to do something with Linux:

1 Like

In addition to the mount unit linked above

First a link to a utility script - using this - you won’t need fstab mounts

Second a link to a more generic troubleshooting guide

2 Likes