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:33:48 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: daniel.j.botz@cummins.com (Dan) Newsgroups: comp.unix.tru64 Subject: Re: How do I mount a file system for root access only? Date: 24 May 2002 05:33:48 -0700 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 192.158.61.61 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1022243628 22372 127.0.0.1 (24 May 2002 12:33:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 24 May 2002 12:33:48 GMT Xref: archiver1.google.com comp.unix.tru64:7799 Michael Heiming wrote in message news:... > Dan (): > > > Greetings! > > > > I should probably know the answer to this but I seem to have a > > mental block at the moment. > > > > 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. > > A little bit beyond me, why you are doing this... Ofcourse. I didn't explain why I was doing it. :-) > > > It has been running great except once in a while, I get a nosey > > user > > who does something to make the file system busy. When the script > > finishes running and it is time to unmount the file system, the > > nosey user causes the script to generate an error when the script > > tries to unmount the file system because the file system is now > > busy. > > Perhaps, all the user did was 'cd /mountpoint'. Or a 'find /mountpoint -name something', or who knows.... > > > Is there any way to mount the file system so that root is the only > > one who has access to it? > > > > 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. > > Create the mountpoint with perms 700 before you mount it? > Or use 'fuser' or 'lsof'(if you have it) and log the user out from > your script, before you umount...;-) > > Michael Heiming What the heck! I know I tried this yesterday and it did NOT work as I expected it to. I was really baffeled as to why. I was about to write a response and tried it again to make sure I documented exactly what was happeneing and it works just as I would expect it to. I must have fat-fingered something. :-(( Thanks for your response though!!!!