tape permission

Latest response

Hi,

i have on my server an LTO tape drive and i can use it with user root .
when i try to use tape drive whith another user i receive this message:
[myuser@myserver script]$ mt -f /dev/st0 rewind
/dev/st0: Permission denied

I have already add myuser to group tape with # usermod -G tape myuser
but i have the same problem

this is the st0 permission :

[myuser@myserver script]$ ls -al /dev/st0
crw-rw---- 1 root tape 9, 0 Sep 30 14:41 /dev/st0

what's wrong ?

Thanks in advance

Cesare

Responses

Hi Cesare,

I don't have a tape drive at hand, but I believe you also need to run "newgrp tape" as "myuser" to switch to the required group in the login shell. Otherwise, your commands still run with your primary group. Example with user "test", whose primary group is "test" and who's also in the "tape" group:

$ touch file1 ; ll file1
-rw-rw-r--. 1 test test 0 Oct 22 12:00 file1
$ newgrp tape
$ touch file2 ; ll file2
-rw-r--r--. 1 test tape 0 Oct 22 12:00 file2

Hi Radek,
i solved this problem following the suggestion that gave me redhat support :
the solution was add myuser to group disk and now i'm able to manage tape when i'm logged on as myuser.
I don't know why this kind of workaround ... becouse in other distro like debian is enough belonging to group tape.
anyway i could try also your suggest.
Thanks a lot
Cesare

Great! I'm glad your problem has been resolved.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.