NFS permission issue after QNAP upgrade from QuTS Hero 4.3.4 to 5.0

I use a QNAP TS-673A at home for both vSphere storage (presented via iSCSI), media, TimeMachine backups, Veeam backups as well as providing NFS mounts to a Linux VM amongst other duties. After upgrading from QuTS Hero h4.5.4.1813 build 20211006 to h5.0.0.1892 Build 20211222 my NFS mounts to a Linux VM stopped working as expected. As root on the Linux VM, it all worked fine but my applications on this VM run as a user and this user no longer had access to the files.

Looking in /var/log/syslog I saw entries similar to:

Dec 29 16:53:22 <Linux Host> multipathd[663]: sda: add missing path
Dec 29 16:53:22 <Linux Host> multipathd[663]: sda: failed to get udev uid: Invalid argument
Dec 29 16:53:22 <Linux Host> multipathd[663]: sda: failed to get sysfs uid: Invalid argument
Dec 29 16:53:22 <Linux Host> multipathd[663]: sda: failed to get sgio uid: No such file or directory

And in dmesg I saw entries such as:

[   65.267676] systemd-fstab-generator[5724]: Checking was requested for "192.168.1.5:/<nfs share>", but it is not a device.
[  112.909054] systemd-rc-local-generator[8423]: /etc/rc.local is not marked executable, skipping.
[  112.913258] systemd-fstab-generator[8419]: Checking was requested for "192.168.1.5:/<nfs share>", but it is not a device.
[  139.810485] systemd-fstab-generator[10504]: Checking was requested for "192.168.1.5:/<nfs share>", but it is not a device.
[  139.816019] systemd-rc-local-generator[10511]: /etc/rc.local is not marked executable, skipping.
[ 8328.468003] systemd-rc-local-generator[58098]: /etc/rc.local is not marked executable, skipping.
[ 8328.471129] systemd-fstab-generator[58093]: Checking was requested for "192.168.1.5:/<nfs share>", but it is not a device.

The two above may have absolutely nothing to do with the issue but they were new to me. I investigated the syslog message but this appears to be an ESXi multipath related issue which for my lab environment can be ignored for now.

As the user I was unable to browse the mounted directories although it had full permissions and I also did a chown -R a few times but it was still not working. Now I am not a Linux admin – I know enough to be dangerous! But I couldn’t fathom out what was going on. I tried reverting the VM to a previous backup at a point I knew it worked, but the issue still persisted.

I then realised I’d recently upgraded the firmware on the QNAP NAS and it may be the culprit. However I checked all NFS settings and related permissions and all was as I’d previously set up. Bizarre. I then tried to downgrade the QNAP firmware and then dug around in the settings a little more. I noticed a setting called ‘Enable manage-gids’ in the QNAP Control Panel > Network & FIle Services > Win/Mac/NFS/WebDAV which seemed new to me and this was disabled. I enabled it and tried again and everything was working as it was before. I then upgraded the NAS firmware (again!) and all is now working.

I need to do a little more reading about how Linux (or perhaps more specifically Ubuntu 20 which I am using) and what this setting does exactly and how it works.

The dmesg entries I saw have now disappeared.

I thought I’d quickly write this in case anyone out there is facing similar issues.

Leave a Reply

Your email address will not be published.