Fstab mounting - rw permissions denied

OK so I am able to mount an smb nas drive using the following

//192.168.1.10/Shared /media/nas_shared    cifs    credentials=/.secrets/smb,rw,iocharset=utf8    0    0

Once I restart the daemon and mount -a, the share is shown in nautilus and I can even navigate and open files. Problem? The share is mounted in RO mode. I followed the docs and added the 'rw'. no errors on mounting are thrown.

For some reason the shared drive is mounted as root even though I used the server credentials for my user on that folder.

Any ideas?

After mounting it, run the following command and share the output:

stat /media/nas_shared | grep -i access

It may be that the mount point itself doesn't have the rw permission for the normal user.

Here is the stat results:

Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2025-12-05 12:30:49.742848000 -08

As you can see it mounted as 'root' not as 'damon' which is the user I want

The owner of the mount point /media/nas_shared is root and only it has all rwx permissions.

Either you grant rwx permissions for all while the owner is still being root:

sudo chmod -R 777 /media/nas_shared

Or, change the ownership from root to the user:
(Replace username with your actual username)

sudo chown -R username /media/nas_shared

After this you will get access to read, write and delete the contents.

The question is why is it owned by root if I used my user creds to log into the NAS drive? Not sure I understand.

Also, would I have to reassign ownership every time I login? In windows or if I mount the drive through Nautilus I need not reassign ownership. Thanks for the help in understanding.

Is your partition in a windows format or is it ext4?

If it's in ext4 there is an option under Gparted to "take ownership", rather than it being owned by root.

If it's in windows format then that option is greyed out.

What I did was to copy all the data to a 128Gig thumb drive, reformat the partition as ext4, then copy everything back, then use the take ownership option and everything worked fine from there.

I tried all manner of things suggested here and elsewhere to fix the permissions first but none of them worked.

Once you successfully run those suggested commands, the changes will be permanent. No need to worry about reassigning ownership on each login/reboot. But if you change the mount point later to something different then you will need to use it again for this one.


To understand this you have to first understand Linux File structure a little bit:

Anything outside your /home are mostly owned by root, and normal users (without root privileges) have restricted access to those. This is for a security measure you can say. So when you first mounted your nas drive under /media the mount point /media/nas_shared got created by the root thus it became the owner.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.