Problem connecting nfs share - all files executable

Bo Berglund bo.berglund at gmail.com
Tue Jul 5 08:39:12 UTC 2022


I have been struggling with this for hours now and I have searched my old notes
and googled all in vain!
I seem to recollect having looked for this before but cannot remember or find
the solution...

So:
I have tried to mount an nfs share on my Synology Diskstation NAS to a number of
Ubuntu servers and desktops and the result is that when I list the content of
the mounted directory all files are set as executable even though they are just
media files for the most part.
And the displayed owner of the files also varies wildly between the Ubuntu
devices.

Here is the fstab entry I have tried:

192.168.119.138:/volume1/VIDEO /mnt/nas nfs tcp,noexec,intr 0 0

And here is an example of how a listing looks like:

$ ll /mnt/nas/FILM/Beatles/
total 4602176
drwxrwxrwx 2 nobody users       4096 2015-06-14 13:36  .
drwxrwxrwx 8 nobody users       4096 2019-12-02 17:06  ..
-rwxrwxrwx 1 nobody users 1013643181 2015-06-14 13:27  BeatlesAnthology1.mp4
-rwxrwxrwx 1 nobody users 1110634268 2015-06-14 13:36  BeatlesAnthology2.mp4
-rwxrwxrwx 1 nobody users 1104688094 2014-03-31 22:12  Beatles-Help_(1965).mp4
-rwxrwxrwx 1 nobody users 1483631310 2015-06-14 13:45  SgtPepper.mp4

What am I doing wrong here?
I want to show the files as non-executable and also a proper owner/group

I have the same problems also for other share dirs not containing media files
but regular text files, all are shown as executable!

When I mount a samba share using the following fstab entry there are no such
problems but here the mount command itself contains arguments to set the flags:

//192.168.119.216/msnbc /mnt/smb cifs
vers=3.0,credentials=/root/.smb_ubuntuserv,noexec,uid=bosse,gid=bosse,dir_mode=0775,file_mode=0664,nounix
0  0

But as I understand it the arguments used for the cifs mount are not valid for
nfs, right?

So is it possible to fix for nfs too?


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list