Cannot change the permission of /etc/dfs/sharetab

I am using a Solaris 5.10 with patch level 10/08.

Here /etc/dfs/sharetab is listed as a file system with "df -k" as below:

 
#df -k /etc/dfs/sharetab
Filesystem kbytes used avail capacity Mounted on
sharefs 0 0 0 0% /etc/dfs/sharetab

What is "sharefs"? This is not present in my other Solaris machines.

I have logged in as root user. But I am not able to change the permission of /etc/dfs/sharetab file with chmod. It gives an error as "chmod: WARNING: can't change /etc/dfs/sharetab".

Please let me know what should be done to change the permission of this file.

It seems that your Solaris machine is exposing the file /etc/dfs/sharetab this file determines which directories will be NFS-shared at boot time. Each line is a share command.
Sharefs is a file system like proc file system.
In Solaris 10, there is a new filesystem called sharefs.

1 Like

It is a part of an in-memory file - just like /etc/mnttab. It is no longer a regular file.

Thanks a lot for your reply. Do you mean I cannot change the permission of this in-memory file? If yes, why not?

What are the current permissions and what do you want to change them to? And why?

1 Like

Permissions of this file can't be changed as the sharefs pseudo file system is read-only by design.

If you want to (indirectly) modify the content of this file, simply use one of the share, sharemgr, sharectl or zfs commands.

1 Like

The permissions on the file is 444. I want to remove read permission to group and others. I could change the permission of this file in the ealier patch levels of Solaris 10. I am facing this problem with patch level 10/08.

Could you please tell me, if this was introduced in the recent patch levels? If yes, why?