Amanda-Users

chg-zd-mtx and permissions

2006-04-12 23:15:24
Subject: chg-zd-mtx and permissions
From: "Salvatore Enrico Indiogine" <hindiogine AT gmail DOT com>
To: amanda-users AT amanda DOT org
Date: Wed, 12 Apr 2006 21:11:56 -0500
Here is the relevant part of /etc/amanda/archive/amanda.conf

runtapes 2                       # number of tapes to be used in a
single run of amdump
tpchanger "chg-zd-mtx"    # the tape-changer glue script
tapedev "/dev/nst0"         # the no-rewind tape device to be used
changerdev "/dev/sg1"
changerfile "/var/lib/amanda/archive/changer"


cat /var/lib/amanda/archive/changer.conf

firstslot 7
lastslot 8
cleanslot -1
driveslot 0
autoclean=0
autocleancount=99
havereader=1
offline_before_unload=0
unloadpause=12
poll_drive_ready=6
max_drive_wait=120
# initial_poll_delay=NN


Then I test the setup.

cd /etc/amanda/archive/
$ /usr/lib/amanda/chg-zd-mtx -info

<none> cannot determine first slot


cat /var/log/amanda/chg-zd-mtx.20060412202427.debug

chg-zd-mtx: debug 1 pid 6274 ruid 33 euid 33: start at Wed Apr 12 20:24:27 2006
20:24:27 Using config file /var/lib/amanda/archive/changer.conf
20:24:27 Arg info:
         $# = 1
         $0 = "/usr/lib/amanda/chg-zd-mtx"
         $1 = "-info"
20:24:27 Running: mtx status
20:24:27 Exit code: 1
         Stderr:
cannot open SCSI device '/dev/sg1' - Permission denied
20:24:27 Exit (2) -> <none> cannot determine first slot
chg-zd-mtx: pid 6355 finish time Wed Apr 12 20:24:27 2006


This is the default setup of Fedora4 for this device:

$ ls -l /dev/sg1
crw-------  1 root root 21, 1 Apr  5 04:40 /dev/sg1


Thus is you run it as root (sudo):

sudo /usr/lib/amanda/chg-zd-mtx -info

1 6 1 1


So, what is the modus operandi?  Will amanda have problems with these
permissions?  Do I have to change them?  Even adding amanda to the
root group will not work with these 600 permissions.  I think that the
permissions are set dynamically by udev.

Thanks in advance.



--
Enrico Indiogine
Parasol Laboratory
Texas A&M University

enricoi AT cs.tamu DOT edu
hindiogine AT gmail DOT com
979-845-3937


<Prev in Thread] Current Thread [Next in Thread>