6

I have server (debian 6) machine (say, ip = 10.13.13.100) with nfs exports

/etc/exports

 /path/to/my/shared/folder 10.13.13.0/24(rw,async,no_sub_tree_check,no_root_squash)

There are two users on this machine admin (uid = 1000) and user (uid = 1001)

on client machines (also debian 6) (say, ip = 10.13.13.111) i have /etc/fstab

 10.13.13.100:/path/to/my/shared/folder /my/mount/point nfs rw,exec,user,owner 0 0

There is only one user (uid = 1000)

after reboot or mount -a, the shared folder is mounted successfully, but i can not execute any file on it (even if files have exec permissions). However, read and write for files on this file system works fine.

5

May be the noexec flag is set.

  • I have the noexec flag for my shared folder entry in /etc/mtab.. even if I remove the entry from mtab and than unmount and mount the shared folder, the noexec appears again.. Why? And how can i fix this??? – yakki Mar 18 '13 at 19:27
  • It is the default for nfs. You may add the exec option to change it. – Brigo Mar 18 '13 at 19:33
  • Should I add it to client:/etc/mtab? or server:/etc/exports? or client:/etc/fstab? – yakki Mar 18 '13 at 19:36
  • /etc/fstab, i think, but not really sure, sorry. :-) – Brigo Mar 18 '13 at 19:37
  • its already in fstab, and still does not work=( thanks anyway – yakki Mar 18 '13 at 19:42
7

The culprit is the user option you have used in /etc/fstab, and specifically that you have placed the exec option before the user option.

From man mount:

user: Allow an ordinary user to mount the filesystem. ... This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

I suppose this behaviour is for security reasons. Anyhow, whenever you use user, you should specifically add an exec option if that is what you want and it should be after the user option to override the noexec implied by user.

0

I've fixed the issue by changing the client:/etc/fstab contents to the following:

10.13.13.100:/path/to/my/shared/folder /my/mount/point nfs rw,exec 0 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.