Some subfolders on a mounted share inaccessible

On the QNAP, the v2/v3 service and v4 service are all enabled. Not sure about the squash options tbh, can’t see anything like that in the QNAP GUI.

I still can’t get my head around why: 1) the same content is fully accessible from a LibreElec machine on the same network, and 2) two identically structured folders on the same mounted share display opposite behavior, where one is accessible and the other is not.

Frustrating!

Check this guide

Maybe you want to try SMB if you don’t want to spent time on the NFS user permission issue.

Also maybe check on the QNAP the directories how they are “different”

First, most of your NFS shares are Kodi-based (ie not kernel-based). This includes “TV Teens”:


        <source>
            <name>TV Teens</name>
            <path pathversion="1">nfs://192.168.50.190/Multimedia/TV Shows/TV Teens/</path>
            <allowsharing>true</allowsharing>
        </source>

Second, you also have one fstab entry for “TV Teens” that is incorrectly specified:

192.168.50.190:/nfs /mnt/Multimedia/TV\040Shows/TV\040Teens        nfs     noauto,x-systemd.automount  0  0

Assuming that the Kodi entry is correct, the fstab entry should be:

192.168.50.190:/Multimedia/TV\040Shows/TV\040Teens /mnt/Multimedia/TV\040Shows/TV\040Teens nfs noauto,x-systemd.automount 0 0

Ideally, you should choose either Kodi- or kernel-based shares and stick with one method.

Edit: I see you’ve also installed and configured autofs, so it’s unclear to me what you’re aiming to do:

/etc/auto.nfs.shares /mnt/QNAP-873-SOF2/Multimedia\0402 autofs rw,relatime,fd=6,pgrp=408,timeout=15,minproto=5,maxproto=5,direct 0 0
/etc/auto.nfs.shares /mnt/QNAP-873-SOF1/TV\040Teens autofs rw,relatime,fd=6,pgrp=408,timeout=15,minproto=5,maxproto=5,direct 0 0
/etc/auto.nfs.shares /mnt/QNAP-873-SOF1/Multimedia autofs rw,relatime,fd=6,pgrp=408,timeout=15,minproto=5,maxproto=5,direct 0 0

@dillthedog thanks for checking the mount point info in the logs, totally forgot about that.

@aff13 besides the multitude of access methods you now have configured. It looks like that TV Teens is not a subfolder but a separate NFS share on the QNAP.

Can you run showmount -e 192.168.50.190 and showmount -e 192.168.50.199 and show the output (best copy&paste) so that we understand your setup?

Ah, I see now - thanks for this. The squash option was at the default level of “squash no users”. I subsequently experimented with the other two available options (“squash all users” and “squash root user only”) but it made no difference unfortunately.

I have been looking in great detail into this and there isn’t anything different between the directories. They are all subfolders on the “Multimedia” network share with the exact same properties. NFS access rights are set on the network share itself (i.e. on “Multimedia”), so everything in it should automatically inherit the same access rights. Which indeed seems to be the case from my Windows and LibreElec machines on the network - but for some reason, OSMC just can’t access it.

If they are all subfolders than just mount Multimedia and remove all the other mounts you created

Sure, here is a snapshot of the output (hope it helps?)
snapshot

“TV Teens” is definitely a subdirectory (subfolder) in the “Multimedia” NFS share. There are only three NFS shares on the QNAP (Public, Downloads, and Multimedia).

In any case though, it’s not possible at all to browse into “TV Teens” from OSMC, which shouldn’t be the case irrespective of whether it’s an NFS share or subfolder - as long as the QNAP has set the correct permissions (which is the case, as confirmed with all other non-OSMC systems on the network). Right?

Another thing to mention is that there are no such NFS accessing issues with the “Multimedia 2” share on my second QNAP unit, which has identical settings and access privileges.

Thanks dillthedog for looking into this, appreciate it.

Tbh, I have no idea how I ended up with Kodi-based and kernel-based NFS shares!

This was me experimenting with various NFS solutions proposed on the forum; I tried to read all I could find on the topic and follow the instructions.

In any case, to avoid potential program conflicts and making a mess, I just reinstalled OSMC from scratch.

Unfortunately, the problem remains :frowning:

Even starting from a clean install, I cannot browse into certain subfolders on “Multimedia”.

I am attaching a new log, in case it helps to identify the issue.

Thanks again for your insights.

That would explain the issues you had earlier as you where mounting the parent and subfolder at the same time. AS you now have a clean system I suggest you install autofs and just create a single autofs entry for /mnt/Multimedia with 192.168.50.190:/Multimedia and let’s check the results from there.

So I installed autofs on the clean system and created a single entry for “Multimedia”. Still getting the same problem, with “TV Teens” inaccessible from the OSMC machine :frowning:

I noticed a couple of things that may or may not be relevant. First, the “TV Shows” folder is the only one that comes up in quotation marks. Second, two other folders (Kodi and TEMP) which are inaccessible from the Vero appear in a different colour to all other folders, as per the attached snapshot. These folders remain fully accessible from the LibreElec and Windows machines.

Does either of these things bear any significance?

The quotes are there because “TV Shows” contains a space.

Please upload fresh logs so we can see what’s on the box.

Please on your QNAP Webinterface go into File Manager and show the content of Multimedia something must be different with TV Teens.

They are in different colour and not accessible because of the permission they have. You see that on the left drwxrwx--- the last three --- indicated that world has no access to this folders. So this indicate that there is a user permission issue.

But that would be a different issue as TV Teens which seems to even not show up in the Folder listing.

For the topic access you could try change the share to squash_all_users on the QNAP that should normally mean that all users are mapped to nogroup/nouser but I would really be interested in how the users look like if you check it directly on the QNAP.

Sure, here is the updated log

Thanks

The log is showing errors for more than just “TV Shows/TV Teens”. Here’s one example that’s repeatedly occurring in the Movies section:

2021-08-09 09:04:10.618 T:3736047840    INFO: CNFSFile::Open: Unable to open file : 'Multimedia/Movies/Movies Kids/Movies Kids Animation/BG Movies Collection/Рибката Пи (2006).mkv'  error : 'open call failed with "NFS: ACCESS denied. Required access r--. Allowed access ---"'
2021-08-09 09:04:10.619 T:3736047840   ERROR: Open - failed to open source <nfs://192.168.50.190/Multimedia/Movies/Movies Kids/Movies Kids Animation/BG Movies Collection/Рибката Пи (2006).mkv>
2021-08-09 09:04:10.619 T:3736047840   DEBUG: DoWork - trying to extract filestream details from video file nfs://192.168.50.190/Multimedia/Movies/Movies Kids/Movies Kids Animation/BG Movies Collection/Тайната на горските пазители (2013).mkv

The first line is indicating that it’s a permission problem:

open call failed with "NFS: ACCESS denied. Required access r--. Allowed access ---

@fzinken
@dillthedog

Thanks both for your continued guidance. Having done a lot of additional digging, I think I am finally getting to the bottom of this. I don’t have a solution, but I might have come up with a workaround. I will describe everything below, for the benefit of anyone using the Vero +QNAP combo, who might find themselves in a similar situation.

It seems the issues might be related to the user/owner of the folder in question. I came across this post on the QNAP forums, where another frustrated users claims that “a NAS folder owned by root can never be accessed via NFS”. Therefore, “shared folders and subfolders should NOT belong to root” for NFS access to work.

If the above is true, in my specific case it would imply some folders (e.g. TV Kids) do not belong to root, while others (TV Teens) do, and are therefore inaccessible via NFS.

I still don’t understand:

  1. how different subfolders on the same share ended up with different owners, given that they were all created by the same admin user at approximately the same time?

  2. why there are no NFS access issues whatsoever from the LibreElec machine, but the Vero runs into this problem?

In any case, to test the theory, I created a new subfolder “TV Teens TEST” and copied over some files into it from the original problematic “TV Teens” subfolder. Sure enough, the new “TV Teens TEST” folder appears green in Terminal, has the correct drwxrwxrwx permissions and I was to browse into it.

The bizarre thing is that all subfolders (TV Kids, the new TV Teens TEST and the original problematic TV Teens) have the same permissions and the same owner, as per the attached screenshots. Yet, the first two folders are accessible, and the last one is not.



Anyway, the workaround would be to move all files from “TV Teens” to “TV Teens TEST” and rename the latter folder. That would destroy the Kodi libraries on my other machines (LibreElec and Windows) and would require a lot of additional rescanning, which is far from ideal, but as of now I don’t have any other ideas…

Did you tried squash_all_users and restarting NAS and Vero?

Alternative you could try to add -fstype=nfs4,uid=1000,gid=1000 in your autofs file between the mountpoint and the server IP.

Yes, but it didn’t make a difference unfortunately.

Thanks, I’ll give that a go and see if it works :+1:

I don’t use LibreElec but a quick search indicates that the default SSH logon is to root, so perhaps all processes run as root. I hope someone else can confirm / deny this hypothesis. If LibreElec processes run as root, that would explain why you have no problem accessing the files from LE. By contrast, on OSMC Kodi runs under the user “osmc” (UID 1000, GID 1000)

I also don’t have any experience of QNAP – or Synology, for that matter – but I noticed that you have set Guest Access Rights to “Deny Access”. Did you ever try “Read Only” or something the that effect?

AFAICT, you should be able to SSH to your QNAP box, since it’s a Linux-based device. So try to logon and run these commands:

exportfs -v
ls -la /Multimedia
ls -la "/Multimedia/TV Shows"
cat /etc/passwd

(Please copy/paste the results, rather than providing a screenshot.)

Edit: to comment on this bit:

Don’t forget to first rename the original “TV Teens” to “TV Teens OLD” (or something along those lines). As far as OSMC is concerned, this should work without the need to resort to path substitution. (Remember to reboot both devices.) However, I guess there’s always a risk that it might adversely affect the QNAP user interface,

I don’t have an opinion on if that is the way to go but just to throw in a FYI regarding moving sources…

That could be a good explanation and that would also explain why now change to squash_all_users doesn’t make a difference. So only solution there is set squash_all_users (at which time it should also not be accessable from LibreElec) and then onetime change the user of the folder directly on QNAP from root.