Bacula-users

Re: [Bacula-users] smartctl permission denied

2010-03-02 09:56:28
Subject: Re: [Bacula-users] smartctl permission denied
From: Martin Simmons <martin AT lispworks DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 2 Mar 2010 14:32:16 GMT
>>>>> On Sat, 20 Feb 2010 17:26:19 +0100, Andrea Venturoli said:
> 
> Hello.
> 
> I've done a new installation of Bacula 5.0.0 on FreeBSD 7.2p6/amd64.
> My bacula-sd.conf has the following:
> 
> Device {
>    Name = DAT160
>    Description = "DAT160 for FreeBSD"
>    Media Type = DAT160
>    Archive Device = /dev/nsa0
>    AutomaticMount = yes;               # when device opened, read it
>    AlwaysOpen = yes
>    Offline On Unmount = no
>    Hardware End of Medium = no
>    BSF at EOM = yes
>    Backward Space Record = no
>    Fast Forward Space File = no
>    TWO EOF = yes
> #  If you have smartctl, enable this, it has more info than tapeinfo
>    Alert Command = "sh -c 'smartctl -H -d scsi -l error /dev/nsa0'"
> }
> 
> I can run "smartctl -H -d scsi -l error /dev/nsa0" as root, but in email 
> reports I get:
> 
> Alert: Smartctl open device: /dev/nsa0 failed: Permission denied
> 3997 Bad alert command: sh -c 'smartctl -H -d scsi -l error /dev/nsa0': 
> ERR=Child exited with code 2.
> 
> 
> I thought it was a permission problem, but:
> 
> #ps aux | grep acula
> bacula    70980  1.1  0.2 24664  4720  ??  DLs   2:56PM   2:00.15 
> /usr/local/sbin/bacula-sd -u bacula -g bacula -v -c 
> /usr/local/etc/bacula-sd.conf
> 
> # cat /etc/group|grep bacula
> operator:*:5:root,bacula
> bacula:*:910:
> 
> # ls -l /dev/|grep nsa
> lrwxr-xr-x  1 root   wheel            6 Feb 17 11:13 nsa0 -> nsa0.0
> crw-rw----  1 root   operator    0, 113 Feb 20 16:01 nsa0.0
> crw-rw----  1 root   operator    0, 119 Feb 17 11:06 nsa0.1
> crw-rw----  1 root   operator    0, 122 Feb 17 11:06 nsa0.2
> crw-rw----  1 root   operator    0, 125 Feb 17 11:06 nsa0.3
> 
> 
> Any hint?

No sure if you solved this yet, but did /etc/group contain that entry when you
started bacula-sd?

Does "procstat -s 70980" show 5 (i.e. operator) in the groups list for the
bacula-sd process?

__Martin

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

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