Examine this output:
# df –t nfs
FilesystemSizeUsedAvailUse%Mounted on
o16:export30G21G7.6G74%/mnt
# 1s -1 /mnt/nfs.sh
-rwxr-mr-x. 1 root root 22 May 8 16:37 /mnt/nfs.sh
# file /mnt/nfs.sh
/mnt/nfs.sh: Bourne-Again shell script text executables
# /mnt/nfs.sh
bash: /mnt/nfs.sh: Permission denied
What is the reason for the error?
A.
The file system was exported on host o16 using the ROOT_SQUASH option.
B.
The /export filesystem was mounted with the NOEXEC option on host o16.
C.
The filesystem mounted on /mnt was mounted with the NOEXEC option.
D.
The filesystem was exported on host o16 by using the NO_ROOT_SQUASH option.
Explanation:
Commad file can read the file. So it does NOT bounce back root. A is wrong.
But it is NOT executable on the client. So C is the correct.
By default NFS will downgrade any files created with the root permissions to the nobody user.
Sometimes it is important to share files that are owned as root with the proper permissions, in these cases this can be done by simply adding the no_root_squash attribute to the /etc/exports configuration.
โชคดีครับ!!!!
C
The answer is C
================
noexec option = permission denied
-c
Mount Point:
noexec: Disallows the execution of binary files on the file system