Here:
crw-rw----  1 root disk 21, 1 Jun 23 12:26 /dev/sg1
crw-rw----  1 root disk 9, 0 Jun 23 12:26 /dev/st0

/etc/init.d/bacula-sd:
SD_USER=bacula
SD_GROUP=disk

Standard permissions after installation (I think):
drwxrwx---  2 root bacula 4096 Jun 28 11:30 /var/bacula

[EMAIL PROTECTED] var]# ps -ef | grep bacula-sd
bacula   29581     1  0 11:30 ?        00:00:00 /usr/sbin/bacula-sd -u
bacula -g disk -c /etc/bacula/bacula-sd.conf

Does in console:
#update slots
The defined Storage resources are:
     1: File
     2: Autochanger
Select Storage resource (1-2): Unexpected question has been received.
2
Connecting to Storage daemon Autochanger at swlinbck2:9103 ...
3306 Issuing autochanger "slots" command.
Device "Autochanger" has 16 slots.
Connecting to Storage daemon Autochanger at swlinbck2:9103 ...
3301 Issuing autochanger "loaded drive 0" command.
3991 Bad autochanger "loaded drive 0" command: ERR=Child exited with code 1.
3306 Issuing autochanger "list" command.
Invalid Slot number: mktemp: cannot create temp file
/var/bacula/mtx.NCucc29701: Permission denied
Invalid Slot number: /etc/bacula/mtx-changer: line 157:
/var/bacula/mtx.29700: Permission denied
Invalid Slot number: cat: /var/bacula/mtx.29700: Permission denied
Invalid Slot number: cat: /var/bacula/mtx.29700: Permission denied
Invalid Slot number: Autochanger error: ERR=Child exited with code 1
No Volumes found to label, or no barcodes.
#

----------------------------------------------------------------------------
--------
So after that I changed for testing /var/baculua to 777:
drwxrwxrwx  2 root bacula 4096 Jun 28 11:30 /var/bacula

But it does following in console:
#update slots
The defined Storage resources are:
     1: File
     2: Autochanger
Select Storage resource (1-2): Unexpected question has been received.
2
Connecting to Storage daemon Autochanger at swlinbck2:9103 ...
3306 Issuing autochanger "slots" command.
Device "Autochanger" has 0 slots.
No slots in changer to scan.
#

Wrong!

----------------------------------------------------------------------------
--------
That´s not true - when I change in /etc/init.d/bacula-sd to
SD_USER=root

I got:
#update slots
The defined Storage resources are:
     1: File
     2: Autochanger
Select Storage resource (1-2): Unexpected question has been received.
2
Connecting to Storage daemon Autochanger at swlinbck2:9103 ...
3306 Issuing autochanger "slots" command.
Device "Autochanger" has 16 slots.
Connecting to Storage daemon Autochanger at swlinbck2:9103 ...
3301 Issuing autochanger "loaded drive 0" command.
3302 Autochanger "loaded drive 0", result: nothing loaded.
3306 Issuing autochanger "list" command.
Catalog record for Volume "000001L3" updated to reference slot 1.
Catalog record for Volume "000002L3" updated to reference slot 2.
Volume "000003L3" not found in catalog. Slot=3 InChanger set to zero.
Volume "000004L3" not found in catalog. Slot=4 InChanger set to zero.
Volume "000009L3" not found in catalog. Slot=9 InChanger set to zero.
Volume "000010L3" not found in catalog. Slot=10 InChanger set to zero.
Volume "000011L3" not found in catalog. Slot=11 InChanger set to zero.
Volume "000012L3" not found in catalog. Slot=12 InChanger set to zero.
Catalog record for Volume "000016L3" updated to reference slot 16.
#

Which is true. And than 770 for /var/bacula is ok too - of course. :)


Greetings,
user100




> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Im 
> Auftrag von Kern Sibbald
> Gesendet: Mittwoch, 28. Juni 2006 11:10
> An: bacula-users@lists.sourceforge.net
> Cc: Timo Neuvonen
> Betreff: Re: [Bacula-users] /var/bacula write problem (sd, 
> mtx-changer)
> 
> 
> On Wednesday 28 June 2006 10:04, Timo Neuvonen wrote:
> > > > So, is anyone running autochanger with storage daemon 
> as non-root
> > > > (bacula:disk)?
> > >
> > > I am, on a Debian/sid system with the 1.36.3 packages still:
> > >
> > > 0 [EMAIL PROTECTED]:~$ ps -ef | grep bacula-sd
> > > bacula    9101     1  0 Mar12 ?
> > > 00:00:00 /usr/sbin/bacula-sd -c 
> /etc/bacula/bacula-sd.conf -u bacula -g
> >
> > tape
> >
> > Ok, this roughly corresponds to the setting bacula:disk 
> used in Fedora,
> > although a better choice (no disk access, tape only). But 
> non-root anyway.
> >
> > > 0 [EMAIL PROTECTED]:~$ ls -l /dev/sg0 /dev/nst0
> > > crw-rw----  1 root tape  9, 128 2002-03-14 22:51 /dev/nst0
> > > crw-rw----  1 root tape 21,   0 2002-03-14 22:51 /dev/sg0
> > > 0 [EMAIL PROTECTED]:~$ ls -ld /var/lib/bacula
> > > drwx------  3 bacula bacula 4096 2006-06-28 02:08 /var/lib/bacula
> 
> The problem here is that the permissions of the directory 
> (/var/lib/bacula 
> or /var/bacula depending on your OS) really should be 770
> or possibly 760.  As long as the permissions are 770 and the 
> user bacula is in 
> the group bacula, then the file can be owned by root.
> 
> >
> > Bingo!
> > You have owner:group bacula:bacula (NOT root:bacula) for 
> this directory,
> > the same I yesterday also changed it into.
> >
> > Actually, this isn't a proof yet, that root:bacula couldn't 
> work. But
> > that's something I still believe in...
> 
> root:bacula can and does work as I stated in a previous 
> email, and as I state 
> above -- providing you have the other items setup correctly 
> (permissions, 
> group memberships, ...).
> 
> There should also be no problem if the directory is owned by 
> bacula:bacula.
> 
> -- 
> Best regards,
> 
> Kern
> 
>   (">
>   /\
>   V_V
> 
> Using Tomcat but need to do more? Need to support web 
> services, security?
> Get stuff done quickly with pre-integrated technology to make 
> your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on 
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to