Problem connecting nfs share - all files executable

Bo Berglund bo.berglund at gmail.com
Mon Jul 11 12:35:18 UTC 2022


On Sun, 10 Jul 2022 21:20:52 -0400, Little Girl <littlergirl at gmail.com> wrote:

>Hey there,
>
>Bo Berglund wrote:
>
>>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.
>
>Did you end up getting this sorted out? This page may be of use in
>the event that you still need it:
>
>https://unix.stackexchange.com/questions/103415/why-are-files-in-a-smbfs-mounted-share-created-with-executable-bit-set
>

This seems to deal with connections to a *SAMBA* server share....
I *have* found ways to set such SMB mounts in fstab so as to set the executable
flag sensibly.

But my question is about the mount of an *NFS* share as an nfs connection. On
this particular mount the executable flag is globally set for some unknown
reason...

I don't know of mount arguments that can fix this similar to what is used on a
CIFS mount (AKA SAMBA).

EXAMPLES for mounts on Ubuntu desktop devices:
----------------------------------------------
Samba on my Ubuntu server:

//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

This results in:
$ ll /mnt/smb/
...
drwxrwxr-x 2 bosse bosse        0 2022-03-23 23:59 backup
drwxrwxr-x 2 bosse bosse        0 2021-10-14 16:04 barn
-rw-rw-r-- 1 bosse bosse      162 2022-03-24 13:35 bbk_aspomint.log
...

NFS on my Synology NAS:

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

This entry results in a different (unwanted) output:

$ ll /mnt/nas/
total 92
drwxrwxrwx 15 root   root   4096 2019-10-07 06:05 .
drwxr-xr-x  7 root   root   4096 2022-02-12 11:52 ..
drwxrwxrwx  6 nobody users  4096 2022-01-11 16:56 Backup
drwxrwxrwx 19 nobody users  4096 2022-05-27 16:44 BARN
drwxrwxrwx  5 nobody users  4096 2014-02-07 11:33 BARNBARN
....

216 is my Ubuntu server, 138 is the Synology NAS


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list