I've been struggling trying to get Amanda running on a FreeBSD 4.3-STABLE
box with a HP SureStore 12000E 6-tape DAT changer for what seems like an
eternity now.

I first tried installing via the FreeBSD ports collection.  That was version
2-4-2p2.  I could not get any of the changer scripts that built to work.
Alas, chg-scsi was not built because of incomplete CAM porting, etc.  I
surmised chg-scsi would work if only I could get it built.

I posted my questions to the FreeBSD Questions list with very little
success.

The next day I posted my questions to this list and got what seemed like
good advice:  Forget the FreeBSD ports collection, download the latest 2.5.0
via CVS and build the package yourself.  Then, right before a 'gmake
install', just copy over the newly created chg-scsi to the appropriate
location and you're good to go.

Well, sort of.  Turns out I can run chg-scsi as root (I do get an error
telling me I'm not running as user operator), but I can not run chg-scsi as
operator.  I get permission denied errors.

Here's the log:

Script started on Mon Jun  4 03:04:37 2001
bash-2.05# amcheck -s love
Amanda Tape Server Host Check
-----------------------------
ERROR: running as user "root" instead of "operator"
Holding disk /disk2: 11843263 KB disk space available, using 11833023 KB
changer: got exit: 0 str: 1 6 1 1
changer: got exit: 0 str: 1 /dev/nrsa0
amcheck-server: slot 1: date X        label love01 (first labelstr match)
NOTE: skipping tape-writable test
Tape love01 label ok
Server check took 38.616 seconds

(brought to you by Amanda 2.5.0)
bash-2.05# su -m operator -c 'whoami'
operator
bash-2.05# su -m operator -c 'amcheck -s love'
Amanda Tape Server Host Check
-----------------------------
Holding disk /disk2: 11843263 KB disk space available, using 11833023 KB
changer: got exit: 2 str: chg-scsi: open: 0:3:1: Permission denied
amcheck-server: could not get changer info: open: 0:3:1: Permission denied
could not get changer info: open: 0:3:1: Permission denied
amcheck-server: pid 83843 finish time Mon Jun  4 03:06:05 2001

(brought to you by Amanda 2.5.0)
bash-2.05# chio status
slot 0: <ACCESS>
slot 1: <ACCESS,FULL>
slot 2: <ACCESS,FULL>
slot 3: <ACCESS,FULL>
slot 4: <ACCESS,FULL>
slot 5: <ACCESS,FULL>
drive 0: <ACCESS,FULL>
bash-2.05# su -m operator -c 'chio status'
chio: /dev/ch0: open: Permission denied
bash-2.05# ls -al /dev/ch0
crw-r-----  1 root  operator   17,   0 Jun  4 03:07 /dev/ch0
bash-2.05# chown operator.operator /dev/ch0
bash-2.05# ls -al /dev/ch0
crw-r-----  1 operator  operator   17,   0 Jun  4 03:07 /dev/ch0
bash-2.05# su -m operator -c 'chio status'
slot 0: <ACCESS>
slot 1: <ACCESS,FULL>
slot 2: <ACCESS,FULL>
slot 3: <ACCESS,FULL>
slot 4: <ACCESS,FULL>
slot 5: <ACCESS,FULL>
drive 0: <ACCESS,FULL>
bash-2.05# exit

Script done on Mon Jun  4 03:09:43 2001

I eventually removed 2.4.2-p entirely and built and installed the entire
2.5.0 version from scratch via:

mkdir /usr/home/operator
chown operator.operator /usr/home/operator
cd /usr/home/operator
su -m operator -c
'cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/amanda login'
<RETURN>
su -m operator -c
'cvs -z3 -d:pserver:[EMAIL PROTECTED]:/cvsroot/amanda co
amanda'
su -m operator -c
'cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/amanda logout'
su -m operator -c 'cd amanda'
su -m operator -c './autogen'
su -m operator -c
'./configure  --with-user=operator --with-group=operator --with-smbclient'
su -m operator -c 'gmake'
su root
make install

Still get the exact same results.

Notice that once I chown'd /dev/ch0 to operator.operator I was able to run
'chio -status' without problems (is this what I should have done?), but
chg-scsi still didn't work.  That makes me wonder if this problem is
FreeBSD-related.  I tried changing references of "0:3:1" to "/dev/ch0" but
that didn't help.  I tried changing ownership and permissions of /dev/ch0,
/dev/nrsa0, /dev/sa0, /bin/chio/, /usr/local/libexec/amcheck, etc., all to
no avail.

I need to know what to change to allow user operator to run amcheck, etc.
Or should I just run with user root?  Isn't that a security no-no?

Please, please help me.  I'm desperate (and oh so close)!!!

Sean Noonan



Reply via email to