Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site bu-cs.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!genrad!panda!talcott!harvard!bu-cs!root From: root@bu-cs.UUCP (Barry Shein) Newsgroups: net.unix,net.unix-wizards Subject: Re: Tape drives and protection of tapes (using tar) Message-ID: <326@bu-cs.UUCP> Date: Sat, 30-Mar-85 23:22:14 EST Article-I.D.: bu-cs.326 Posted: Sat Mar 30 23:22:14 1985 Date-Received: Wed, 3-Apr-85 01:40:18 EST References: <1634@psuvax1.UUCP> Organization: Boston Univ Comp. Sci. Lines: 23 Xref: watmath net.unix:4094 net.unix-wizards:12683 I'll repeat my simple suggestion regarding tape drive access under UNIX, no one has complained yet though I don't use it (yet, no one here seems to ever USE tapes.) 1.Create a pseudo user who will own the drives when free, the name 'free' is an excellent choice. 2. chown all tape devices to 'free' and remove other permissions. 3. Write a little shell script or C program to chown to the current effective uid of the person running this program a tape drive (all minor devices). Make it setuid() to root. After it does the chowns it setuid's to the effective uid and forks a shell and waits for exit. On exit it chowns the tape devices back to 'free'. Maybe call this 'mtmount', arg could be unit number if you have more than one tape. Now just a 'ls -l /dev/mt0' or whatever tells a user that a tape is 'free' (or who is using it so they can use 'write' if need be.) Also, hangups and logouts should now free the tape up (catch SIGHUP in the mtmount prog.) Hey, like all advice on this net, it's 'free' :-) -Barry Shein, Boston University