"weof" operation in "mt" command gives "permission denied"

"weof" operation in "mt" command gives "permission denied"

Post by tim wern » Sun, 20 Nov 1994 08:41:29



Hi,

Some time ago I made a mistake and deleted my /dev directory.  Since
then, I have had to occasionally run the "mknod" command to create a
device here and there.  I did have a directory list of /dev, and I have
used that as a guide for which major and minor node numbers to use, and
which type of file to create.

Anyway, my Exabyte 8200 is /dev/nrst0, which is listed as:

  crw-rw-rw-   1 root     wheel      9, 128 Oct 29 09:30 /dev/nrst0

I am trying to write 2 eof marks after the end of file 0, so that I can
re-write file 1.  The sequence that I use for this on the the same tape
at work (and this works just fine) is:

  1) mt -f /dev/nrst0 asf 1   position after the first eof (after file 0)
  2) mt -f /dev/nrst0 bsf 1   position before the first eof
  3) mt -f /dev/nrst0 weof 2  make it look like file 0 is only file on tape
  4) mt -f /dev/nrst0 bsf 1   position after the first eof

When I try this with linux, the weof command (step 3) results in:

  mt: /dev/nrst0: Permission denied

Is this a problem with the driver, or is there something wrong with my
device definition.  According to the man page, I should be able to do
this under Linux pretty much the same as it works under SunOS.

There is no problem writing to the tape otherwise.

I have Slackware 2.x.

thanks,
tw