1834660 Members
2369 Online
110069 Solutions
New Discussion

/etc/exports permissions

 

/etc/exports permissions

It currently looks like:

/vol1 -anon=65534,async,root=hp3
/oracle/backup -anon=65534,async
/var/opt/ignite/clients -anon=2,async,ro

I want to give oradba and root rw access and everyone else ro.

How do I do this?

Thanks in advance!
4 REPLIES 4
Chris Garman
Frequent Advisor

Re: /etc/exports permissions

The permissions in exports say how the filesystem is allowed to be mounted on the remote system. This is independant of the user accessing it. To achieve what you require export and mount the filesystem read-write, and use the UNIX file and directory permissions to make everything read only as required.
Anthony Goonetilleke
Esteemed Contributor

Re: /etc/exports permissions

make these filesystems owned by oradba
do a chmod -R 711 on all the filesystems
use root=hp3 and
rw=hp3
now when these are mounted the machine hp3 will have full root access and oradba will have rw access but all others will only have read only access.
i.e rwxr--r--

Minimum effort maximum output!
unix team_4
Occasional Advisor

Re: /etc/exports permissions

This is a correction to Tony's reply.
chmod -R 711 is wrong, 744 is correct; however, this would hit directories too.
Better is:
find /mydir -type f -exec chmod u=rwx,g=r,o=r {} ;
NOTE: assuming the files are owned by oradba:dba, you will have also locked out all other accounts in the group 'dba'.
Chris Garman
Frequent Advisor

Re: /etc/exports permissions

Sheri,

Take a backup first!!

I would advise caution in chmod-ing files if this directory contains an application like the Oracle rdbms.

Permissions on this are set correctly as designed by Oracle and changing them is very likely to cause the application to fail.

If this contains Oracle data files, then just check the database still starts after changing the permissions, and restore from the backup if there are any problems.

Chris