# Relative path on Win10/Ubuntu to store date on NAS

**URL:** <https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254>\
**Category:** Help\
**Tags:** media-records\
**Created:** [February 26, 2021, 5:07pm UTC](https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254 "2021-02-26T17:07:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![HolBaum5](https://avatars.discourse-cdn.com/v4/letter/h/ed655f/32.png) [@HolBaum5](https://gramps.discourse.group/u/HolBaum5)\
**Post date:** [February 26, 2021, 5:07pm UTC](https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254/1 "2021-02-26T17:07:49Z")

</div>

Win 10 & Ubuntu 20.02 Gramps 5.1.3

Hello,

I would like to store my data on a NAS server and edit them both from Windows and from a Linux computer (Ubuntu).

This works fine with the database. As I understand it, each computer actually stores its relative media path locally. On the Windows system this goes, also only with the Ubuntu system I always get an error. In addition, I see under relative media path in the GUI also always the Windows path.

What am I doing wrong?

 ![image](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/f7d7aaa8faad79974e44ce11b8bfd3489dfac385.png)

---

<div class="post-metadata">

**Author:** ![prculley](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/prculley/32/41_2.png) [@prculley](https://gramps.discourse.group/u/prculley)\
**Post date:** [February 26, 2021, 5:39pm UTC](https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254/2 "2021-02-26T17:39:26Z")

</div>

The relative media path is stored both locally, and in the db. When a db is created or when the path is changed in the preferences while the db is open, a copy of the path is included into your db. So when set on one system, (Windows), and opened on another system, the path will end up pointing to the wrong place. Unless you can figure out a way to make the path appear the same on both systems.

---

<div class="post-metadata">

**Author:** ![keithjac](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@keithjac](https://gramps.discourse.group/u/keithjac)\
**Post date:** [February 26, 2021, 5:46pm UTC](https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254/3 "2021-02-26T17:46:27Z")

</div>

I had the same issue when I put my Gramps data on the USB drive connected to my Router (Router/USB)

I could use the Gramps data fine with Windows, Router/USB mapped as drive Z:

But on my Linux Mint systems Gramps would report the Router/USB data files as Read Only. All other Linux based applications would work fine with any data stored on the Router/USB.

To rectify this issue I had to create a Mount Point on the Linux Local Drive for Router/USB and I can now use Gramps on my Linux and Windows systems.

Note 1: This problem only existed for Gramps all other data on Router/USB was available to all other Linux based applications.

Note 2: I have to thank Nick Hall for assisting me with and resolving this issue.

I’ll lookup the required string added to fstab later if you require it.

---

<div class="post-metadata">

**Author:** ![DaveSch](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/davesch/32/40_2.png) [@DaveSch](https://gramps.discourse.group/u/DaveSch)\
**Post date:** [February 26, 2021, 5:55pm UTC](https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254/4 "2021-02-26T17:55:34Z")

</div>

> [@HolBaum5](#):
>
> In addition, I see under relative media path in the GUI also always the Windows path.

The RMP is stored with each individual tree and not as a universal Gramps setting. This allows each tree a user may create to have its own media folder.

---

<div class="post-metadata">

**Author:** ![HolBaum5](https://avatars.discourse-cdn.com/v4/letter/h/ed655f/32.png) [@HolBaum5](https://gramps.discourse.group/u/HolBaum5)\
**Post date:** [February 27, 2021, 11:57am UTC](https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254/5 "2021-02-27T11:57:43Z")

</div>

I have tried a few things but can’t get the database file to become writable.  
No matter if I use my NAS or GoogleDrive. With all other programs I can work with the data on NAS/GoogleDrive but not with Gramps.  
I think I will work locally on the Linux system and copy to NAS/GoogleDrive when I make changes.

---

<div class="post-metadata">

**Author:** ![keithjac](https://avatars.discourse-cdn.com/v4/letter/k/82dd89/32.png) [@keithjac](https://gramps.discourse.group/u/keithjac)\
**Post date:** [February 27, 2021, 2:13pm UTC](https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254/6 "2021-02-27T14:13:34Z")

</div>

Create a local folder called Samba on your Linux system

Now edit its fstab file and add the following line

[//NNN.NNN.NNN.NNN/](https://NNN.NNN.NNN.NNN/)_NNNN_ /mnt/Samba cifs user=username,pass=password\_mode=0777,dir\_mode=0777,uid=1000,gid=1000,vers=1.0

Where  
NNN.NNN.NNN.NNN = network address of your NAS drive  
_NNNN_ = Name of the NAS drive  
username = your username  
password = your password

Now reboot and you should see the content of your NAS drive in the Samba folder.

If at anytime you loose network connection then the Samba folder will be empty. If so correct the network problem and reboot the system.

You may need to edit the parameters of (\_mode=0777,dir\_mode=0777,uid=1000,gid=1000,vers=1.00 but I found these worked for me.

---

<div class="post-metadata">

**Author:** ![HolBaum5](https://avatars.discourse-cdn.com/v4/letter/h/ed655f/32.png) [@HolBaum5](https://gramps.discourse.group/u/HolBaum5)\
**Post date:** [February 28, 2021, 9:22am UTC](https://gramps.discourse.group/t/relative-path-on-win10-ubuntu-to-store-date-on-nas/1254/7 "2021-02-28T09:22:07Z")

</div>

Thank you Keithjac,

the vers=1.00 entry did the trick.

I know it’s more of a Linux problem.  
The permissions in my directory are correct

 ![grafik](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/a3e6731128ca7742c0d6d2082fe2ad18e051240e.png)  
but I still get the message:

53365: ERROR: grampsapp.py: line 156: Unhandled exception  
Traceback (most recent call last):  
File “/usr/lib/python3/dist-packages/gramps/plugins/db/dbapi/sqlite.py”, line 160, in commit  
self.\_\_connection.commit()  
sqlite3.OperationalError: database is locked

I have no idea what else this could be.

Regards Holger
