Trouble using NAS with Ubuntu

I have been using Ubuntu for about a month. I stopped using WIndows and thought I’d try Ubuntu 24. But I’m having trouble with getting the Ubuntu apps to see and use my NAS. I have two NAS connected to my network. For example, If I open Libre writer, I see the NAS, but can not open anything. The Ubuntu file manager will show both NAS and then if I click on them I can see all the files. Once I do this in the file manager than I can open a file using Libre, but then it only opens it in read only. Which completely useless. How can I change this so that I can use this stuff without all this annoying ahssle? Thanks, Mike

It’s helpful if you’re specific with details; Ubuntu’s main products use a year.month format (eg. Ubuntu 25.10 is the 2025-October release), with some specialist products using the year format (eg. Ubuntu Core 24 is a reduced size version of Ubuntu 24.04 LTS Server).

Are you using Ubuntu Core 24?

Using the template helps us understand what you’re using, and thus what will help you.

Myself I’m a mostly desktop user, thus am better the year.month products (eg. 24.04) rather than the year products (eg. 24) which are usually used on IoT devices or in the Cloud.

Also please note area rules.… ie.

What technology does the NAS use to present the storage? SFTP? Samba? NFS?
You can mount these and then access them like a local file system. The “remoteness” is managed for you. Dead easy. You can mount it read/write this way and have full access

1 Like

Sorry, I have Ubuntu 24.04.3 LTS.

OK, what sharing technology are you able to use? How is the data shared?

2 Likes

Here’s what I did to get my NAS to work
install samba
sudo apt update
sudo apt install samba
modify smb.conf by adding
client min protocol = core
client min protocol = nt1
restart
sudo systemctl restart smbd
sudo systemctl restart nmbd

sudo apt update
sudo apt install cifs-utils
sudo mkdir /mnt/nas

make a credential file
sudo nano ~/.smbcredentials
added username and password then saved file

set permissions
sudo chmod 600 ~/.smbcredentials

modify fstab file
sudo nano /etc/fstab
added these lines to fstab
//192/168.1.192/freenas cifs credentials= /home/mike/
.smbcredentials, uid=1000, gid=1000, _netdev 0 0
save

sudo mount -a

This is from my memory, Mike

I have been struggling with my Ubuntu 24.04 and NAS for a while. I have modified fstab and other items. THis allows me to connect to my NAS through the Ubuntu file manager. THen I can access NAS from most but not all programs. If I do not connect the NAS via the file manager, I can not see the NAS on any programs. I have set a mount point as /mnt/nas, but nothing ever is in this directory. So, I’m thinking something is wrong with my fstab or other items. In the mean time I wanted to try and see if I can determine where the NAS did connect to the file system went I connect via the file manager. In the terminal program, I went back to the root and then did a tree command. There is a boat load of files that roll on the screen. Then when I see files from my NAS, I ctrl c to stop the command. I then scrolled up to see where the mount point is (apparently the file manager must make it’s own mount point, which is different than the one I specified in fstab). going up in the tree, I found smb-share:server=freenas.local,share=freenas. This is my NAS. Continuing up on the tree, this is in the gvfs directory, which is in the 1000 directory and finally in usr. With this knowledge, I went into file manager hoping to find my NAS mountpoint. I can see usr, but there is no directory 1000 to go to. What is happening here? Thanks for the help, Mike

I’ve been reading all I can on Samba, Ubuntu boot process, networking, reading the Ubuntu Doc’s on the internet, etal. I find it hard to trouble shoot when you are just shooting in the dark. But this morning I found the problem. I have been looking at it since the beginning, but failed to see it. I had a syntax error in fstab. After repairing it my NAS directory loaded up at my mount point and I have access to all my files. BUT, I am still a little confused about why the Ubuntu File Manager works differently. I can mount the NAS, by clicking on the file manager sidebar ‘other locations’. My CIFS NAS is listed and it will load my NAS, but not at the mount point described in fstab. But this NAS connection is not available to most of the Ubuntu programs, whereas when the NAS is mounted directly on the tree, it is. I still have a lot to learn.
On that point I have a couple of books, one being ‘The linux command line’ which helps me with the linux commands that I can use in terminal and another book ‘Ubuntu Linux unleashed’. These books didn’t help with connecting the NAS to the Ubuntu, but enlightened me on the Linux itself. I’d like to find some documentation on NAS and how it works, but so far have not had much luck finding this. Can anyone point me in that direction? Thanks for the help.

Here is something else I found in this adventure, i set my mount point for the NAS as /mnt/nas. When I made this directory the owner was root and the NAS could not write to this directory. I had to change the permissions so that I was the owner and group. I also set others as rwx. Don’t quite understand this, but I’m experimenting with changing the name of the mount point and want to see what actually needs to be done.

The default permissions for directories in Linux is 755 (rwxr-xr-x) and the /mnt directory is owner:group root:root which means you must be root (use sudo) to create a directory or file there. You can then as root (use sudo) change the owner:group of sub-directories in /mnt.

I don’t see a mount point in the fstab entry you posted earlier, as shown in an example in the thread at the link below. Never used samba myself.
https://forums.linuxmint.com/viewtopic.php?t=375505

OK, when I use ‘umask’ it comes back with 002, isn’t that the default permissions? And I’m not sure I understand permission for a directory. Is it the same as a file? If a user doesn’t have permission for a directory is it hidden from him? How are these permissions used with a NAS? Is the NAS considered a user? Seems that if the mount point doesn’t have permissions, my NAS can not be mounted, is this an incorrect thought?
Yes I see that there is no mount point in my file. That must have been a typo on my part. It should have been
//192.168.1.192/freenas /mnt/nas cifs credentials=/home/mike/.credentials, uid=1000, gid=1000 vers=1.0, _netdev 0 0. Thanks for the help. Linux beginner, but learning and hoping to do better, Mike

The umask equivalent of 755 for directories is 022. The link below discusses and gives some explanation of using umask. You should be able to find any number of sites explaining this online.

https://web.deu.edu.tr/doc/oreily/networking/puis/ch05_03.htm

You can get the permissions on your mount point (/mnt/nas) with the command: ls -ld /mnt/nas.

Default permissions for files is 644. If the parent directory does not have execute permissions a user will not be able to modify anything in a sub-directory so your nas directory under mount should be 755 OR 022. I don’t use nas so can’t help with those questions.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.