Hello,

On 5/9/2007 8:40 PM, Don MacArthur wrote:
> Well, using the debug clues at 
> http://sourceforge.net/mailarchive/message.php?
> msg_id=1113581682.27380.34.camel%40localhost.localdomain
> 
> I ran it with the "bacula" account and I now know:
> 09-May 12:27 [director]: ERROR TERMINATION at message.c:254
> 
> Could not open console message file /data/bacula-sql-
> backup/[director].conmsg: ERR=Permission denied

Ok, so I think we agree that there is a permission problem (easily 
generated by starting Bacula as root the first time, by the way).

> 09-May 12:27 [director]:  Error: message.c:668 fopen /data/bacula-sql-
> backup/[director].[director].137248288.mail failed: ERR=Permission
> denied
> 
> And yet, the bacula account owns /data/bacula-sql-backup and everthing
> in it!?!?  I even set the .conmsg file to 777.  
> 
> All input is welcome, including references to previous posts or
> documentation.  
> 
> I'm feelin' pretty feeble at the moment...

Well, it's just your task to fix all necessary permission :-)

Not only the actual files, but also the directories they reside in, and 
possibly directories above these, and so on...

Start with the DIR and see if all the directories and files you 
configured it to use can be read and written by it. This is most easily 
done by logging in as the bacula user, IMO. The DIR needs access to its 
configuration, the working directory you configured, the state file, and 
  the log files you set up.

The SD can be more difficult, because it needs write access to the tape 
drives, and that might mean you have to create some udev rules or 
similar for it. Basic file access should be the same as with the DIR - 
just log in as the SD user and check all the files and directories it 
will need to access (configuration, state file, working directory and 
spool space).

The FD is probably easier as it usually runs as root and thus can access 
whatever it needs without problems.

If you've done this, and tried to start the daemons, and it still fails, 
double-check the permissions :-) and see if you run SELinux or AppArmor 
- these could prevent access to the daemons, too.

Hope this helps,

Arno

> TIA!
> 
> On Tue, 2007-05-08 at 21:52 +0200, Ralf Gross wrote:
>> Don MacArthur schrieb:
>>> I've been running bacula for like this for about a year (recently
>>> upgraded from 1.38.7).  I've always started the services manually, but
>>> now I have other admins working with the system also, and want it to
>>> autostart at boot.  
>>>
>>> Symptoms:
>>> When I try to start the director via "bacula-ctl-dir start" I get the
>>> following error -
>>> "Starting the Bacula Director daemon
>>> 07-May 16:18 bacula-dir: ERROR TERMINATION at parse_conf.c:791
>>> Config error: Cannot open config file "/etc/bacula/bacula-dir.conf":
>>> Permission denied"
>> As which user did you start bacula-dir? The director doesn't have to
>> run as root user, but then you have to set the permissions correctly.
>>  
>>> My most extreme effort to solve this was to grant bacula ownership and
>>> to set the the permissions to 777.  But, it still fails.  
>> Only on the config file or on the whole path to the file?
>>  
>>> More Symptoms:
>>> When I ran the director as root I started the SD and FD via bacula-
>>> ctl-... and the backups failed because of permissions to the tape
>>> drive.  
>> If you start the sd as user bacula, the user must be in the tape
>> group (debian), and you should check if the tape group has access to
>> the tape device (I think 660 on /dev/nst0, or so). I had to create an
>> udev rule to get this right.
>>  
>>> So, do I need to change the bacula account (a group membership?), mod
>>> the objects it wants, or am I going in the wrong direction completely?
>> It's the right direction. Check the ownership/permissions of the tape
>> device and as which user your daemons run. The fd must run as root if
>> it should be able to backup all data on a system. The other daemons
>> can run as user bacula.
>>
>> http://www.bacula.org/dev-manual/Bacula_Security_Issues.html#SECTION004630000000000000000
>>
>> Ralf
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
IT-Service Lehmann                    [EMAIL PROTECTED]
Arno Lehmann                  http://www.its-lehmann.de

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to