From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,d3f69c9cf173c6fb X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-05-24 05:42:16 PST Message-ID: <3CEE3525.DCE27949@sql.de> Date: Fri, 24 May 2002 14:42:13 +0200 From: Joerg Bruehe Organization: SQL Datenbanksysteme GmbH X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.unix.tru64 Subject: Re: How do I mount a file system for root access only? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: server1.software-ag.de X-Trace: 24 May 2002 14:42:14 CET, server1.software-ag.de X-Complaints-To: abuse@nacamar.de X-Admin-Comment: X-NNTP-Posting... are valid if present Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-stu1.dfn.de!news.belwue.de!news.seicom.net!news-in.ivm.net!news.ivm.net!server1.software-ag.de Xref: archiver1.google.com comp.unix.tru64:7802 Hi! Dan wrote: > > [...] > > I have a script, which runs periodically to copy some files from one > system to a mount point on another system. It first creates a mount > point, mounts a file system to it, copies the files to the mounted > file system, unmounts the file system, and then removes the mount > point. Assuming the name of the mount point does not change: Create that directory once, with appropriate ownership and permission. Create some file in there, just with a name: "NOT_MOUNTED__KEEP_OFF". This prevents others from creating it and serves as documentation. > > It has been running great except once in a while, I get a nosey user > who does something to make the file system busy. [...] > > Is there any way to mount the file system so that root is the only one > who has access to it? In my 4.0D manuals of "fstab" and "mount", I found none. > > I have a work around by "chmod 700" the mount point/file system after > the mount but I am wondering if there is a better way. Between the > time I mount it and do the chmod, there is a possibility that the user > could get in there and make it busy. If you never recreate the filesystem itself, a "chown" / "chmod" done while it is mounted will also be effective at the next mount, so after the initial change there is no time window for that user. In the mounted state, the owner / permission of the file system's root directory do matter, that of the mount point are irrelevant. HTH, Joerg Bruehe -- Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany (speaking only for himself) mailto: joerg@sql.de