Re: [Bacula-users] bacula-fd cannot access files from the system still getting [permission denied]

2015-08-16 Thread JING YANG
I check my journctl. I did journalctl -u bacula-dir.service, now it show
a different error says'

Aug 15 23:56:17 thidwick bacula-dir[5858]: 15-Aug 23:56  Message delivery
ERROR: Mail program terminated in error.

   CMD=/usr/lib/bacula/bsmtp -h
localhost -f (Bacula) root@localhost -s Bacula: Backup OK of
thidwick-fd Incremental root@localhost

   ERR=No such file or directory

Maybe, this will give you guys more hint on the actual problem?


Thanks,

Jing

On Sat, Aug 15, 2015 at 12:53 PM, Kern Sibbald k...@sibbald.com wrote:

 On 15.08.2015 17:44, Josip Deanovic wrote:
  On Saturday 2015-08-15 12:15:13 Kern Sibbald wrote:
  Hello,
 
  I also think this may be a selinux problem.  The best way to know is if
  Jing understands kernel and selinux logs, he can see if there are any
  selinux rejections, since they will not clearly show as being a selinux
  problem in the Bacula messages (the OS does not furnish this info).
  Another way, is to simply turn selinux off temporarily.  If I am not
  mistaken, selinux is enabled by default on newer RedHat/CentOS systems.
 
  Best regards,
  Kern
  RedHat/Centos are using selinux by default (6.x, 7.x, I don't remember
  about 5.x any more) but the original poster said that he is using
  archlinux. I have never used archlinux.
 
 Good point.

 Another thing, if I understand Jing correctly he believes that the
 owner:group of the binary imply what user the FD will be running as.
 Hopefully someone help him understand that the user:group that the
 binary that is executing is determined by the user:group of who started
 the binary and what command line options were used and not by the
 user:group of the binary image.


 --
 ___
 Bacula-users mailing list
 Bacula-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/bacula-users

--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] Baculum 7.2.0 binary packages for Ubuntu 15.04 and Debian 8

2015-08-16 Thread Marcin Haba
Hello,

I prepared new Baculum 7.2.0 binary packages for Ubuntu 15.04 (Vivid)
and Debian 8 (Jessie).

Note, this version is splitted into three packages:

baculum_7.2.0  - base Baculum package
baculum-apache2_7.2.0  - Apache config files for Baculum
baculum-lighttpd_7.2.0 - Lighttpd config files for Baculum

Fresh install can be done by following steps:

=== Ubuntu 15.04 (Vivid) ===

1) Add PPA repository:

$ sudo add-apt-repository ppa:ganiuszka/baculum

2) Update packages index:

$ sudo apt-get update

3) Install Baculum base package:

$ sudo apt-get install baculum

4) Install web server specific Baculum config files and start web server:

a) For Apache:

$ sudo apt-get install baculum-apache2

Next is required to enable mod_rewrite module for Apache manually (if
not enabled):
$ sudo ln -s /etc/apache2/mods-available/rewrite.load
/etc/apache2/mods-enabled/rewrite.load

then enable Baculum webGUI in Apache:
$ sudo ln -s /etc/apache2/sites-available/baculum.conf
/etc/apache2/sites-enabled/baculum.conf

and at the end restart Apache server:

$ sudo service apache2 restart

b) For Lighttpd:

$ sudo apt-get install baculum-lighttpd
$ sudo service baculum-lighttpd start

5) Access from web browser:

http://localhost:9095/

First time login: admin
First time password: admin

=== Debian 8 (Jessie) ===

In case Baculum Debian packages there is no special Debian repository.
From this reason Baculum 7.2.0 deb packages installation can be done
by download binary packages directly and install them:

1) Download and install Baculum base package:

# wget 
https://launchpad.net/~ganiuszka/+archive/ubuntu/baculum/+files/baculum_7.2.0ppa1~jessie1_all.deb
# gdebi baculum_7.2.0ppa1~jessie1_all.deb

2) Download and install web server specific Baculum config files and
start web server:

a) For Apache:

# wget 
https://launchpad.net/~ganiuszka/+archive/ubuntu/baculum/+files/baculum-apache2_7.2.0ppa1~jessie1_all.deb
# gdebi baculum-apache2_7.2.0ppa1~jessie1_all.deb

Next is required to enable mod_rewrite module for Apache manually (if
not enabled):

# ln -s /etc/apache2/mods-available/rewrite.load
/etc/apache2/mods-enabled/rewrite.load

then enable Baculum webGUI in Apache:

# ln -s /etc/apache2/sites-available/baculum.conf
/etc/apache2/sites-enabled/baculum.conf

and at the end restart Apache server:

# service apache2 restart

b) For Lighttpd:

# wget 
https://launchpad.net/~ganiuszka/+archive/ubuntu/baculum/+files/baculum-lighttpd_7.2.0ppa1~jessie1_all.deb
# gdebi baculum-lighttpd_7.2.0ppa1~jessie1_all.deb

# sudo service baculum-lighttpd start

3) Access from web browser:

http://localhost:9095/

First time login: admin
First time password: admin

== Note ==
In initial wizard for access to bconsole by sudo please create a file:

# vi /etc/sudoers.d/baculum

and type there two lines both in case Apache specific and Lighttpd
specific installation:

Defaults:www-data !requiretty
www-data  ALL= NOPASSWD:  /usr/sbin/bconsole

=== Upgrade 7.0+gitdate packages from Git snapshot ===

For users that already using Baculum for Ubuntu or Debian from binary
packages on Launchpad.net marked as 7.0+gitdate that were built from
Git snapshot, I recommend first to remove baculum-7.0+gitdate deb
package and then install Baculum 7.2.0 following on above
descriptions. I am sorry for this inconvenience.

Comments and notices are welcome.

Best regards.
Marcin Haba (gani)

-- 
Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie
za przyjaciół swoich. Jezus Chrystus

--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] error connecting to database

2015-08-16 Thread Tim Dunphy
Hey guys,

I finally have some progress to report! Not all the way there yet, but some
good progress has been made. As of now I am able to use the external (load
balanced) database from within bacula. However I still can't use the SSL
enabled database user.

Here's my catalog config:

# Generic catalog service
Catalog {
  Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
#  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306
  #dbname = bacula; dbuser = admin; dbpassword = secret
  dbname = bacula;  dbuser = admin; dbpassword = secret; dbaddress = 
db.example.com; dbport = 3306
}

With the non ssl enabled database user in the config I can verify that the
director is listening:

[root@ops:/etc/bacula] #lsof -i :9101
COMMAND PID   USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
bacula-di 15357 bacula5u  IPv4 4789422  0t0  TCP *:bacula-dir
(LISTEN)

And I can get into the console.

[root@ops:/etc/bacula] #bconsole
Connecting to Director ops.jokefire.com:9101
1000 OK: ops.jokefire.com Version: 5.2.13 (19 February 2013)
Enter a period to cancel a command.
*

But with the ssl database user in the config, none of that can happen.

I've verified once again that I can connect with the ssl database user:

 #mysql -uadmin_ssl -p -h db.example.com -e use bacula;show tables | head
-5
Enter password:
Tables_in_bacula
BaseFiles
CDImages
Client
Counters

But starting the bacula director with the ssl enabled user in the config,
I'm getting an error in the logs and I can no longer user the director with
bconsole:


#tail -f /var/log/bacula/bacula.log
17-Aug 02:17 bacula-dir JobId 0: Fatal error: Could not open Catalog
JokefireCatalog, database bacula.
17-Aug 02:17 bacula-dir JobId 0: Fatal error: mysql.c:210 Unable to connect
to MySQL server.
Database=bacula User=admin_ssl
MySQL connect failed either server not running or your authorization is
incorrect.
17-Aug 02:17 bacula-dir ERROR TERMINATION
Please correct configuration file: /etc/bacula/bacula-dir.conf


This is my catalog definition with the ssl user in the config:

# Generic catalog service
Catalog {
  Name = JokefireCatalog
# Uncomment the following line if you want the dbi driver
#  dbdriver = dbi:mysql; dbaddress = localhost; dbport = 3306
  #dbname = bacula; dbuser = admin; dbpassword = secret
  dbname = bacula;  dbuser = admin_ssl; dbpassword = secret;
dbaddress = db.example.com; dbport = 3306
}

I've gained a little experience in using SSL database users with a couple
different apps. I've setup both mediawiki and wordpress to use SSL database
connections. But for both of those apps you had to go through extra steps
to get an SSL database user to work. Simply adding the user to the config
wouldn't allow them to work. You would have to go through extra
configuration steps to make them work correctly.

So what I'm wondering is if this might be a similar similar situation with
bacula. That maybe just adding an ssl enabled user to the connection string
isn't enough. And maybe there's some other configuration that has to happen
to get this to work. It's just a guess on my part, but based on my recent
experiences I think it may be a good one!

I'd appreciate hearing your thoughts on this!

Thanks,
Tim

On Thu, Aug 6, 2015 at 9:19 AM, Alex Domoradov alex@gmail.com wrote:

 You could find out with which version of mysql client has been compiled
 your bacula with the following command

 # ldd /usr/sbin/bacula-dir | grep mysql
 libmysqlclient.so.18 = /lib64/libmysqlclient.so.18
 (0x7f07abe3d000)


 # rpm -qf /lib64/libmysqlclient.so.18
 Percona-Server-shared-55-5.5.43-rel37.2.el7.x86_64

 On Thu, Aug 6, 2015 at 3:47 PM, Heitor Faria hei...@bacula.com.br wrote:

 Hey Heitor,

  Actually to 1, no they are not. I have mariadb-5.5.41 on the bacula
 server (client side) and mariadb 10 on the db server. I might try upgrading
 the client on the bacula server tomorrow. I don't have SELinux enabled
 anywhere currently. I probably will enable that tho once I get everything
 working.

 Most important of all is to know what MySQL / MariaDB development
 libraries were used to build you Bacula binaries. You may want / need to
 update Bacula with binaries built from source:
 http://bacula.us/compilation/

 Regards,

 ===
 Heitor Medrado de Faria - LPIC-III | ITIL-F |  Bacula Systems Certified
 Administrator II
 Do you need Bacula training?
 https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list
 +55 61 %2B55%2061%202021-82608268-4220 %2B55%2061%208268-4220
 Site: http://bacula.us FB: heitor.faria
 http://www.facebook.com/heitor.faria

 ===


 I'll try to update you guys tomorrow.

 Thanks for all your input!

 Tim

 On Wed, Aug 5, 2015 at 8:45 AM, Heitor Faria hei...@bacula.com.br
 wrote:


 Em ter, 4 de ago de 2015 às 23:01, Tim Dunphy bluethu...@gmail.com
 escreveu: