Mounting a NAS and using fstab

Greetings to all.
Firstly it feels so good to return to a PC and linux, and in particular Manjaro.
Still polished I see… and I have just installed Gnome.
One thing though, my notes (from 2 years ago) are really out of date.

So I searched around and found a way of mounting my nas synology drives on boot.
I used fstab, but the folder I created to mount the nas in my home folder is
owned by root. Can anyone shed some light as to why that is?
Apologies if I am in the wrong forum section. Please redirect me is so!

I guess the directory changes owner during the mount as fstab is processed by the root user.

Try unmounting that resource and the folder should belong to your user again:

sudo umount ~/path/to/mount

This is normal behavior, at least using “autofs” like I do.

1 Like

Thank you Wibol.

if is a problem for you ? you can umount and after change owner
what matters is the line in fstab , directory not always changes owner (nfs, smb, ftp, ?)
for me, with smb, before boot i can change owner by root but after boot i have always owner me

1 Like

Thank you papajoke. Didn’t know that about SMB!
Could I possibly put my fstab line up in this thread for you and Wibol to look and tell me where I am going wrong?

where is the problem ? it’s this directory or content ? you don’t say you have a error, what do you want?

At you to send much information as possible

  • fstab
  • ls -ld directory
  • ls -l directory/*
  • id
1 Like

its a directory (folder) in home

//mynasipaddress/Mynas /home/user/Mynas cifs username=paul,password=mypassword,ver=2.0,uid=1000,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Ok I will papajoke. Thank you for your help so far. For now here is my fstab line above.
I will boot back into manjaro and get the;

  • ls -ld directory
  • ls -l directory/*

I’m using pretty much the same setup, so far it has not given me any problems and i could do whatever i wanted with my NAS. But admittedly the mount points are still both root.

I don’t understand what the problem is with this either. I have a remote directory mounted on the local system (/mnt/nfs/Servidor/Archivo) and owned by the root user and can read, edit, create and delete files.

The difference is that I am using the NFS protocol instead of SAMBA/CIFS that you use.

Thank you @Alchemix for your reply and @papajoke.

The folder createD by fstab has a padlock and when I click inside it says ‘folder empty’
I don’t know what to say either guys.

Here is the ls -ld output;
drwxr-xr-x 2 root root 4096 Sep 24 15:26 NAS

I try to mount in nautilus and I get the error;

mount.cifs: permission denied

But when I connect using smb:// it there is not a problem!

I hope you can still help, otherwise guy’s thanks for all your input so far!

all this for that ! nothing to do with root
if directory is empty it’s normal : smb is not mounted "permission denied "

it’s not you (same fstab)? here the request was clear

What do you mean ‘all this for that’ all I was doing was asking for help and found the error later. So there is no need to be terse or condescending. @papajoke

I asked you from the beginning what your problem was, and only after 10 messages in the topic I understand that you can’t log in - so yes it’s a lot.

You should try to connect in terminal with the options in fstab; if it works then the pc doesn’t have a network connection yet. otherwise your options are wrong

1 Like

@papajoke You seem to have a problem with patience and anger This is not place for you to take out it on other people.

Since the new forums, newb’s are here!

Heheheh. That is me.

And I am interested in this since getting a QNAP NAS and wanting to get it integrated into my Manjaro KDE box, for use with other machines on the same network and outside.

Thanx for sharing this.

I figured out my needs so I will document here.

New system! Manjaro KDE version 10.2.
I have a NAS which I can reach on my network at
The sub-directory on the NAS that I want to mount is /NAS_DIRECTORY
I want this mounted to appear as a directory in my Documents folder, and called NASSY

In Terminal…

  1. Create the directory to put it into, inside of Documents:
    mkdir /home//Documents/NASSY
  2. Mount the NAS (This is temporary)
    sudo mount -t nfs /home//Documents/NASSY
  3. Navigate in your GUI manager to see if the NAS shows up as NASSY in Documents.
    ============Making it permanent
  4. sudo nano /etc/fstab /home//Documents/NASSY nfs noauto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,hard,intr,noatime 0 0

To save changes:

REBOOT and go see if your new NASSY is in Documents folder.

Happened by this post and saw a missing piece after /home/ <== There should be the username in there!