On Fri, Sep 26, 2003 at 07:54:23AM +0200, Mats Blomstrand wrote: > Hi all > I have run into some silly permission problem that i cant figure out. > What do i miss? > > As amanda-user i can run "mtx" just fine and change tapes back an forth, > but "chg-zd-mtx" says: > > -bash-2.05b$ chg-zd-mtx -info > <none> no slots available > > And "amcheck normal" says: > > -bash-2.05b$ amcheck normal > Amanda Tape Server Host Check > ----------------------------- > WARNING: program /usr/local/amanda/bin/planner: not setuid-root > WARNING: program /usr/local/amanda/bin/dumper: not setuid-root > WARNING: program /usr/local/amanda/bin/amcheck: not setuid-root > Holding disk /amanda: 25678660 KB disk space available, using 25678660 KB > amcheck-server: could not get changer info: no slots available > > Amanda Backup Client Hosts Check > -------------------------------- > WARNING: hostname.deleted: selfcheck request timed out. Host down? > Client check: 1 host checked in 29.999 seconds, 1 problem found > > (brought to you by Amanda 2.4.4) > > But i have set set the SUID bit: > > -bash-2.05b$ ls -l /usr/local/amanda/bin/{planner,dumper,amcheck} > -rwsr-x--- 1 amanda amanda 93327 Sep 5 17:24 > /usr/local/amanda/bin/amcheck > -rwsr-x--- 1 amanda amanda 89732 Sep 5 17:24 > /usr/local/amanda/bin/dumper > -rwsr-x--- 1 amanda amanda 91540 Sep 5 17:24 > /usr/local/amanda/bin/planner > > And this is what the logfiles says after running "amcheck normal": > > -bash-2.05b$ cat /tmp/amanda/amcheck.20030926083742.debug > amcheck: debug 1 pid 16062 ruid 501 euid 501: start at Fri Sep 26 08:37:42 2003 > amcheck: dgram_bind: socket bound to 0.0.0.0.32781 > changer: got exit: 2 str: <none> no slots available > amcheck-server: time 0.140: could not get changer info: no slots available > amcheck-server: time 0.140: pid 16063 finish time Fri Sep 26 08:37:42 2003 > amcheck: pid 16062 finish time Fri Sep 26 08:38:12 2003 > > chg-zd-mtx: debug 1 pid 16075 ruid 501 euid 501: start at Fri Sep 26 08:37:42 > 2003 > 08:37:42 Arg info: > $# = 1 > $0 = "/usr/local/amanda/bin/chg-zd-mtx" > $1 = "-info" > 08:37:42 Running: mtx status > 08:37:42 Exit code: 127 > Stderr: > /usr/local/amanda/bin/chg-zd-mtx: line 387: mtx: command not found > 08:37:42 Exit (2) -> <none> no slots available > chg-zd-mtx: pid 16154 finish time Fri Sep 26 08:37:42 2003 > > > I have also added these entries for xinetd and done a "kill -HUP": > > bash# cat /etc/xinetd.d/amanda-* > # > # amanda client tjänster > # > service amanda > { > disable = no > socket_type = dgram > protocol = udp > wait = yes > user = amanda > server = /usr/local/amanda/bin/amandad > log_type = SYSLOG > } > # > # amanda server tjänster > # > service amandaidx > { > disable = no > socket_type = stream > protocol = tcp > wait = no > user = amanda > server = /usr/local/amanda/bin/amindexd > log_type = SYSLOG > } > # > service amidxtape > { > disable = no > socket_type = stream > protocol = tcp > wait = no > user = amanda > server = /usr/local/amanda/bin/amidxtaped > log_type = SYSLOG > } > > > Any ideas about what im doing wrong?
Two items stand out. The warning are: > WARNING: program /usr/local/amanda/bin/amcheck: not setuid-root ^^^^ Note the "root" part. Your programs are setuid-amanda. I.e. owned by... I suspect that you did your install as the amanda user rather than as root. Only the root user can do the proper change owner/permissions needed. The second is this: > amcheck-server: could not get changer info: no slots available ^^^^^^^^^^^^^^^^^^^^^^^^^^ Which suggests that you did not set up the changer.conf and/or amanda.conf file(s) correctly. Instructions on doing this are in the comment section of the chg-zd-mtx script. One gotcha, the <changer.conf> file must have a ".conf" extension but is listed in the amanda.conf file by just the basename. So if you name the file "mats_mtx.conf" then in amand.conf you just list "mats_mtx" as the changer file. -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road (609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)