On Saturday 10 August 2002 20:46, Sven Kirmess wrote:
>I have a very strange problem. chg-scsi (2.4.2p2) does work if it
> is called as root. When I call it as user amanda it dumpes core.
> By comparing two truss files I found that there is a problem with
> the permissions of the device file:
>
>open64("/dev/rmt/1mn", O_RDWR|O_NDELAY) = 4
>ioctl(4, 0x04C9, 0xFFBFFB78) Err#1 EPERM
>
>But, take a look a look at the permissions at the end of this
> mail.
>
>Sven
I take it you unpacked, made, and installed amanda as root.
Generally speaking, thats a no-no.
You need a user 'amanda', and 'amanda' should be a member of a group
like 'disk' for starters although some use group 'operator' too.
Back out of the source dir once the user:group issue is resolved
and do a
¨chown -R amanda:disk(or whatever group you used)
amanda-version.number.of.build(-dateofbuildrelease)"
Then step back into the directory and do a make clean, then
#> su amanda
#>./configure (with your list of options which includes specifying
the user and group, and any other options required for your system,
mine looks like this for a linux build: Note, I run this instead of
configure because it bottles it all up into a repeatable format..
------------------
#!/bin/sh
make clean
rm -f config.status config.cache
./configure \
--with-user=amanda \
--with-group=disk \
--with-owner=amanda \
--with-tape-device=/dev/nst0 \
--with-changer-device=/dev/sg1 \
--with-gnu-ld \
--prefix=/usr/local \
--with-debugging=/tmp/amanda-dbg/ \
--with-tape-server=192.168.1.3 \
--with-amandahosts \
--with-configdir=/usr/local/etc/amanda
-------------------edit above to suit your system of course
)
#>make
#>exit (back to root that is)
#>make install
Now all the assorted permissions should be set correctly.
Note that root cannot normally execute any amanda util except the
recovery stuffs.
This means you have to test it (amcheck /configname/) etc while
being amanda instead of root. And the crontab entries that will
wind up running her will go into the amanda crontab, not roots.
>
># id
>uid=0(root) gid=1(other)
># uname -a
>SunOS Defiant 5.9 Generic sun4u sparc SUNW,Ultra-250
># /opt/amanda/libexec/chg-scsi -info
>1 5 1 0
>#
>
>
># su amanda
># id
>uid=101(amanda) gid=101(amanda)
># /opt/amanda/libexec/chg-scsi -info
>Segmentation Fault(coredump)
>#
>
># ls -lL /dev/rmt/
>total 0
>crw-rw-rw- 1 root sys 33,392 Aug 10 22:24 0
>crw-rw-rw- 1 root sys 33,456 Aug 10 22:24 0b
>crw-rw-rw- 1 root sys 33,460 Aug 10 22:24 0bn
>crw-rw-rw- 1 root sys 33,408 Aug 10 22:24 0c
>crw-rw-rw- 1 root sys 33,472 Aug 10 22:24 0cb
>crw-rw-rw- 1 root sys 33,476 Aug 10 22:24 0cbn
>crw-rw-rw- 1 root sys 33,412 Aug 10 22:24 0cn
>crw-rw-rw- 1 root sys 33,400 Aug 10 22:24 0h
>crw-rw-rw- 1 root sys 33,464 Aug 10 22:24 0hb
>crw-rw-rw- 1 root sys 33,468 Aug 10 22:24 0hbn
>crw-rw-rw- 1 root sys 33,404 Aug 10 22:24 0hn
>crw-rw-rw- 1 root sys 33,384 Aug 10 22:24 0l
>crw-rw-rw- 1 root sys 33,448 Aug 10 22:24 0lb
>crw-rw-rw- 1 root sys 33,452 Aug 10 22:24 0lbn
>crw-rw-rw- 1 root sys 33,388 Aug 10 22:24 0ln
>crw-rw-rw- 1 root sys 33,392 Aug 10 22:24 0m
>crw-rw-rw- 1 root sys 33,456 Aug 10 22:24 0mb
>crw-rw-rw- 1 root sys 33,460 Aug 10 22:24 0mbn
>crw-rw-rw- 1 root sys 33,396 Aug 10 22:24 0mn
>crw-rw-rw- 1 root sys 33,396 Aug 10 22:24 0n
>crw-rw-rw- 1 root sys 33,408 Aug 10 22:24 0u
>crw-rw-rw- 1 root sys 33,472 Aug 10 22:24 0ub
>crw-rw-rw- 1 root sys 33,476 Aug 10 22:24 0ubn
>crw-rw-rw- 1 root sys 33,412 Aug 10 22:24 0un
>crw-rw-rw- 1 root sys 33,395 Aug 11 01:00 1
>crw-rw-rw- 1 root sys 33,459 Aug 11 01:00 1b
>crw-rw-rw- 1 root sys 33,463 Aug 11 01:00 1bn
>crw-rw-rw- 1 root sys 33,411 Aug 11 01:00 1c
>crw-rw-rw- 1 root sys 33,475 Aug 11 01:00 1cb
>crw-rw-rw- 1 root sys 33,479 Aug 11 01:00 1cbn
>crw-rw-rw- 1 root sys 33,415 Aug 11 01:00 1cn
>crw-rw-rw- 1 root sys 33,403 Aug 11 01:00 1h
>crw-rw-rw- 1 root sys 33,467 Aug 11 01:00 1hb
>crw-rw-rw- 1 root sys 33,471 Aug 11 01:00 1hbn
>crw-rw-rw- 1 root sys 33,407 Aug 11 01:00 1hn
>crw-rw-rw- 1 root sys 33,387 Aug 11 01:00 1l
>crw-rw-rw- 1 root sys 33,451 Aug 11 01:00 1lb
>crw-rw-rw- 1 root sys 33,455 Aug 11 01:00 1lbn
>crw-rw-rw- 1 root sys 33,391 Aug 11 01:00 1ln
>crw-rw-rw- 1 root sys 33,395 Aug 11 01:00 1m
>crw-rw-rw- 1 root sys 33,459 Aug 11 01:00 1mb
>crw-rw-rw- 1 root sys 33,463 Aug 11 01:00 1mbn
>crw-rw-rw- 1 amanda amanda 33,399 Aug 11 01:00 1mn
>crw-rw-rw- 1 root sys 33,399 Aug 11 01:00 1n
>crw-rw-rw- 1 root sys 33,411 Aug 11 01:00 1u
>crw-rw-rw- 1 root sys 33,475 Aug 11 01:00 1ub
>crw-rw-rw- 1 root sys 33,479 Aug 11 01:00 1ubn
>crw-rw-rw- 1 root sys 33,415 Aug 11 01:00 1un
>#
Someone else more familiar with Solaris will have to further define
the interpretation of these errors, but thats what I see from an
amanda users viewpoint. If I'm wrong, then of course I can
probably be ignored. :-)
--
Cheers, Gene
AMD K6-III@500mhz 320M
Athlon1600XP@1400mhz 512M
99.11% setiathome rank, not too shabby for a WV hillbilly
|