SUMMARY: /etc/mnttab reboots to world writable

From: Andrew Lamb (
Date: Wed May 01 1996 - 10:39:25 CDT

        * Original Question
        * Full Replies (4)
        * Solution Used

Original Question:

        Every time my Sparc Classic Solaris reboots the file
        /etc/mnttab is set to world writable. How can I stop this?

Full Replies:

From: Wolf Gruter <>

        you could change change the ownership back to the way you
        want it in one of the rc scripts.Probably best in /sbin/rc3.

From: Henry Katz <>

        to unravel your messup change sh to sh -x in line 50 of
        /sbin/rc2 and watch the classic boot up carefully.

From: Groovy Francis <>
        I spoke to Sun Support about this. They tell me it is a known
        problem since Solaris 2.2. It has a bugid but I don't know
        what it is offhand. The current workaround is to modify
        /etc/init.d/MOUNTFSYS so that it sets the umask before mounting
        things, that is, make it look like the following

        if [ $NQUOTA -gt 0 ]
                echo "Checking UFS quotas: \c"
                /usr/sbin/quotacheck -a -p
                echo "done."
                umask 033 <-- line added
                /usr/sbin/quotaon -a
        This will fix your permission problem.

From: Torsten Metzner <>
        in my opinion the setmnt command in /etc/init.d/buildmnttab
        creates the mnttab:
        18: tom@euler[init.d]> grep setmnt buildmnttab

        buildmnttab:echo "${mntlist}" | /usr/sbin/setmnt

        You can change this to:

        echo "${mntlist}" | /usr/sbin/setmnt
        chmod 664 /etc/mnttab

        I didn't try this, but I think this should work.

        BTW you can ( should ) change this in /etc/init.d/buildmnttab,
        but it is used in /etc/rcS.d/
        buildmnttab and are the same files. is a hardlink to buildmnttab.

Solution Used:

        I added the line "umask 033" to /etc/init.d/MOUNTFSYS as suggested
        by Groovy (?) Francis. This problem had only begun after I had
        implemented quotas on my machine, activating the section of code in
        MOUNTFSYS that Groovy refers to.

        Thanks heaps all of you for taking the time to help me. Andrew

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:59 CDT