Thunderbird is not able to access NAS Folder

I store my mails from Thunderbird on a NAS. With Win10 it was never a problem to assign a NAS Folder to store the mails by thunderbird.
Now, i try to do the same on Zorin 17.2core with no success. Mounting the folder works, however not permanent, but that's something I try to solve later. (After I lost hours with configuring fstab).

In the settings of thuderbird, I can choose the NAS Folder, but it seems thunderbird is not allowed to read/write on in. However, I can see the substructure of the folder by thunderbird. Are there any settings on Zorin to change?
trying a different NAS did not work either.
Thanks

If you installed the Flatpak version of Thunderbird, that may have something to do with it. Long story short, Flatpak is one of various package formats that exist in Linux, and it has restricted access to the rest of the filesystem by default.

You can verify this easily by running the following in the command line:

flatpak list

If you see it listed there, the easiest way to fix it without having to change anything in your settings is to install another package called Flatseal. Take a look at this comment for reference:

You'd have to pick the right location the NAS is mounted on your filesystem and allow Thunderbird permissions to that.

Thank, but as I can see, it is not listed:


Any other ideas?

Maybe it is caused be the fact I am unable to permanently mount the NAS? After boot, i always have to connect it manually. (This would be the next question how to fix this)

Reading your first post again, that makes sense. If this were a Flatpak package you wouldn't have been able to read the contents of the NAS folder at all.

A similar issue that comes up from time to time with network mounts is due to filesystem mismatch. Zorin OS uses the EXT4 filesystem by default, and while it should be able to read files from drives formatted as NTFS (used by Windows), it sometimes results in issues regarding file permissions. Since you mentioned this working fine under Windows, this may be a factor at play here, so you might not be too far off with your assumption that mounting the drive is the actual issue.

How are you mounting the NAS at the moment?

Well, now it starts to become complex. First, the NAS is (unfortunately) a WD CloudEx. I afaik it does not use window file system. My second choice, just for test, is my fritzbox router. There, the stick is ntfs formated. I may change this, the Fritzbox should be able to handle ext3/4 too.

On Zorin, I mount the drive by "other locations" (Don't use english version) over "explorer" (is this nautilus, which comes with the OS? )specifiy IP address and directory. Works fine, although I have to do this at every boot of the system.

I do not know the command for the terminal. What would it be, sudo mount IP/directory username=eee,password=yyyy?

Ok, let's leave the drives alone for now.

Yes, Nautilus is the real name of the program to explore files. I know it's not a very intuitive name, that's why on Zorin OS and other distributions you might see it labeled as Files. Sometimes people also call it File Manager, File Explorer, etc.

So, Nautilus is a bit special in how it handles file sharing over the network. It uses its own internal components and libraries to gain that functionality. This is a good thing in the sense that file network sharing will work out of the box, but it lead to some confusion in cases like this.
Not to worry, though, you can install the necessary packages system-wide to be able to use this location anywhere.

Since you are already familiar with the command line, that will make it easier:

  1. Install the necessary packages:

    sudo apt install cifs-utils
    
  2. Choose a location in your system where to mount the network share. This location is what Thunderbird and other programs will see (from their perspective, it's accessing the local filesystem).

    A typical location for network drives might be inside /mnt. For now, I recommend creating a dummy folder inside your user's home directory, to make things easier while testing it out. Later you can choose a more suitable location for this.

    mkdir $HOME/testing_share
    
  3. To mount it, run the command:

    sudo mount -t cifs //<target_hostname_or>/<path_to_share> <mount_point> -o username=<username>,password=<password>,noexec
    

    Replace all the placeholders within angle brackets with the real data. For example:

    sudo mount -t cifs //192.168.1.10/data $HOME/testing_share -o username=waldo,password=supersecret,noexec
    

    You could also use a domain name if you have DNS setup locally, but that's another topic. The noexec is not actually necessary, but it prevents scripts from running on your machine. This boosts security a little bit, but you can remove it if you do need to run files from this location.

Give this a try and see how it goes.

Thank you, today I am in a hurry. did not work:

mount: /home/rf/lauf: konnte nicht in /etc/fstab gefunden werden.

I have to admit I changed the fstab. However I do not think that influences the error. The directory lauf is created, I can see it by nautilus.

at least mounting works, check by thunderbird to be done. But no time now, have to leave

No success, mounting worked well, but thunderbird now says: The Local Directory path "/home/blabla" is invalid. This is not happening, when I use the "GUI" mounting process, respectively the direct IP address. There, it accepts at least the path.

Maybe it is a certificate topic:


I got this message when I tried to connect to the NAS calendar.

Is there a dashboard that you can access for the WD drive? I'm not familiar with WD CloudEx but it looks like there may be different methods of creating the network share, at least based on this:

If it's using NFS, we can make that work as well but just to confirm.

Was there a more specific error message from Thunderbird? I just find it odd that the mount works using the method above, but Thunderbird still can't read from it. Once mounted, the filesystem is basically an abstraction handled by the underlying driver. Applications don't know whether it's a network share, a secondary external drive, etc.

I'm not sure about the certificate warning, either. It's probably fine. My guess is that the website that the NAS is returning has a self-signed certificate. On the internet, that would be a red flag, but on a local network is more common. I'm not sure if that could be related though... only one real way to find out, to be honest :smiley:

No, during trying of connecting mailfolder, it gave just

Nothing more.
Yes I can access the NAS simply by html (Firefox). I can show some screenshots soon.

These are the options of the NAS.

As I remember, it does not use ntfs.

1 Like

Ok, so it's using WebDAV so we would need to install the appropriate driver for that to work. I'll admit that I've never used this myself so I'm going over the Arch Wiki, as well as the Nextcloud documentation to guide me. Here's a short summary, basically the same as before but with a few differences here and there.

  1. Install the necessary packages:

    sudo apt install davfs2
    

    You might see a scary prompt asking you to confirm whether you want to allow non-administrators to make use of this type of mount. For security, it's best to say "No" to that.

  2. To be able to mount WebDAV filesystem however, you can add your user to a specific group that was created upon installing this package.

    # Change "zenzen" with your username
    sudo usermod -aG davfs2 zenzen
    

    You might need to logout and log back in for changes to take effect.

  3. According to the manual page, you need to be part of this group but you cannot run the command directly in the terminal, you must be create an entry in /etc/fstab first.

    For ordinary users to be able to mount, they must be member of group davfs2 and there must be an entry in fstab.

    The entry looks pretty similar, though. You can overwrite the other one that you added previously (if you haven't already) and update it with something like this:

    http://192.168.178.30/remote/data /home/zenzen/testing_share davfs user,rw 0 0
    
  4. Note that the username and password are not provided here, they need to be stored in a separate file. First, create a dedicated location file under your own user's home directory, and make a copy of the default file:

    mkdir /home/zenzen/.davfs2
    sudo cp /etc/davfs2/secrets /home/zenzen/.davfs2
    

    Change ownership and lock down the location so that only you can access it:

    sudo chown -R zenzen:zenzen /home/zenzen/.davfs2
    chmod 700 /home/zenzen/.davfs2
    chmod 600 /home/zenzen/.davfs2/secrets
    

    Finally edit the /home/zenzen/.davfs2/secrets file to add the credentials as explained by the comments that are under the section Credential Line. Basically, the local mount point followed by the username and optional password, as needed.

  5. Save the file, and run the command: mount -a. This should read the updated /etc/fstab and mount all the drives listed there.

Try again ... :crossed_fingers:

I is not working. it tells me the server does not support webdav. However, it is enabled for that folder. By the way: I had to say "yes" for the davfs2 rights.

Ok, let's just give it one last quick test by specifying the port 8080 when using the WebDAV mount:

http://192.168.178.30:8080/remote/data /home/zenzen/testing_share davfs user,rw 0 0
                     ^ right here, separated by :

I just saw this in one of the online manuals and it's simply enough to give it a try — by the way what is the model of your NAS so that we can look it up? In case it has some useful details about this.

Although, if it doesn't work, I say take a step back and go back to the previous mount type that uses the -t cifs syntax, as that seemed to achieve something. The fact that things work fine for Windows makes me think that is the right protocol to use...

Earlier, you said that the mount worked but Thunderbird complained about it. I wonder if other programs had any issues accessing this mounted location. You can try by downloading an image or something like that. If that works, then we can focus on Thunderbird specifically.

sudo mount -t cifs //192.168.1.10/data /home/zenzen/testing_share -o username=waldo,password=supersecret,uid=1000,gid=1000

You can find out the exact UID and GID by running id -u and id -g respectively, but they are probably 1000.

By the way, does the name of the shared folder in your NAS contain spaces? If yes, you might need to wrap that around quotation marks:

sudo mount -t cifs "//192.168.1.10/folder with spaces/data" ...

Well, hope this works! Otherwise I might consider opening a new thread over at the WD community forums and/or reach out to their support. I don't think (from what I've seen online) that they officially support Linux but might be able to give some ideas.

Thank you. Webdav did not work, but [quote="zenzen, post:6, topic:43072"]
sudo mount -t cifs //192.168.1.10/data $HOME/testin
[/quote] does work, if you know "$Home" means "/home/username". It is working with the nfts formated stick on the fritzbox too.

But two questions remain:

  1. How to get the drives mounted automatically during startup
  2. How to make password invisible. It seems I did not understand how to handle that. I suppos I should be able to use the davfs file?

Yeah, sorry, $HOME is a special variable that points to the user's home directory. There are other similar to this one like $USER that resolves to the username itself, etc.

That's good news, it probably means that is using the SMB protocol which is very common for Windows machines. So let's tackle both questions:

First, you can instruct the system to mount it automatically by adding a new entry to the /etc/fstab file. It's nearly identical to that command from the command lihould look something like:

//192.168.1.10/data /home/zenzen/testing_share cifs credentials=/home/zenzen/.smbcred  0 0

Notice that in this file you need to specify the full path to where you want to mount those files i.e. you cannot use variables like $HOME.

Related to your second point (if I understood correctly), instead of providing the username/password directly to this command, you can point to a file somewhere in your system that contains this information.
You can create this file in the same way you did with the secrets file for the dav2fs package earlier. For example, create a hidden file in your user directory called .smbcred with the following lines:

username=
password= 

And lock it down so that only you can read/write to it:

chmod 600 /home/zenzen/.smbcred

Unfortunately, not all worked well. The system crashed totally. I had to reinstall the OS (now 16.2, it hink). However, if it was caused be the modification of the fstab is not clear.

Just to remember for me the actual status. What I did:
0)mk dir /home/user/folder
1)sudo nano /home/user/.filename
2)chmod 600 /home/user/.filename (Did NOT work. Currently not important)
3)sudo apt install cifs-utils
4)sudo nano /etc/fstab
5)//IP/directory /home/user/folder cifs credentials=/home/user/.filename 0 0

It does link the NAS during startup, but just in read mode. I am not allowed to write. When I try to modify something by the graphical nautils, it tells me i do not have root right.
If I mount manually by sudo mount -t cifs .... it does work, but there I have to reenter my local (Zorin) password again. I think this is might the problem. During boot, I am not asked for the password.

The fact that it's working now, even partially, probably means it was something else that caused the crash. If you have already re-installed the OS, it'll be difficult to find out what happened... were there any specific errors that you recall? If this happens again you can still access the system through recovery mode and modify the /etc/fstab file, in case it indeed is responsible for the crash.

But moving on with the current situation:

Since you used sudo to create this hidden file, it belongs to the root user. To change its ownership and permissions, you need to run with sudo again:

sudo chown zenzen:zenzen /home/zenzen/.filename
# Now you can run without sudo
chmod 600 /home/zenzen/.filename

Try with:

//IP/directory /home/user/folder cifs credentials=/home/user/.filename,uid=1000,gid=1000 0 0

This is akin to what you might have been doing before where you specified the uid and gid options. You can find out the exact UID and GID by running id -u and id -g respectively, but they are probably 1000. It might also work just with your username but it will definitely work with the id number.

Are you using Z17.2 or Z16.2? i.e. was 16.2 a typo in your post #18?