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) " -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  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


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

2015-08-14 Thread JING YANG
Dear Ana,
   It is like this,

-rw-r- 1 bacula bacula 5 Aug 14 02:19 bacula-sd.9103.pid

-rw-r- 1 root   root   5 Aug 14 02:19 bacula-fd.9102.pid

-rw-r- 1 bacula bacula 5 Aug 14 11:05 bacula-dir.9101.pid

anything wrong here?

Thanks,

Jing

On Fri, Aug 14, 2015 at 2:58 PM, Ana Emília M. Arruda <
emiliaarr...@gmail.com> wrote:

> Hello Jing,
>
> Have you checked the write permissions on your Pid Directory?
>
> PIDFILE=/var/run/bacula/$NAME.$PORT.pid
>
> Best regards,
> Ana
>
> Em sex, 14 de ago de 2015 às 14:07, Jing At Penn 
> escreveu:
>
>> Dear Josip,
>>  I really appreciate your help. I am using archlinux. I figured
>> the system daemon configuration file is running under
>> /use/lib/systemd/system/bacula-fd.service. So I changed the user and group
>> in there. Now, I checked "ps aux | grep bacula-fd" it's running as root.
>> However, I still get the permission error. I am running out of ideas
>> right. Desperate for your help
>>
>> Thanks,
>> Jing
>>
>>
>> > On Aug 13, 2015, at 7:15 AM, Josip Deanovic 
>> wrote:
>> >
>> >> On Tuesday 2015-08-11 17:40:17 Jing Yang wrote:
>> >> Here is my init.d script file, i did not see the -u option …. BUSER and
>> >> BGROUP are the two things some other mailing list user told me to put
>> >> there, however, that does not work either.
>> >
>> > Hi!
>> >
>> > I am not sure what OS you are using so my advice here could probably
>> > be improved if you use the solution more suitable for your system.
>> >
>> > If you just want to start the bacula-fd daemon using that init script
>> > and see how it works you can modify this line:
>> > ARGS="-c /etc/bacula/${NAME}.conf"
>> > so that it looks like this:
>> > ARGS="-c /etc/bacula/${NAME}.conf -u root -g root"
>> >
>> > The content of the ARGS variable is later in the function do_start()
>> > passed to the command which will execute the bacula-fd daemon.
>> >
>> > After starting bacula-fd using that modified init script, bacula-fd
>> > should run as root. You can check the process list as before to
>> > ensure that.
>> >
>> > Again, most systems support some procedure that can be used to
>> > source (include) additional file with additional options and
>> > variables.
>> >
>> > I would suggest that you find the best way to supply additional
>> > parameters to the init scripts on your system because modified
>> > init scripts are likely to be overwritten during the update of
>> > the related package.
>> >
>> >
>> >> #!/bin/sh
>> >> ### BEGIN INIT INFO
>> >> # Provides:  bacula-fd
>> >> # Required-Start:$remote_fs $syslog
>> >> # Required-Stop: $remote_fs $syslog
>> >> # Should-Start:  bacula-sd
>> >> # Should-Stop:   bacula-sd
>> >> # Default-Start: 2 3 4 5
>> >> # Default-Stop:  0 1 6
>> >> ### END INIT INFO
>> >> #
>> >> # bacula-fd SysV init script for Bacula-FD.
>> >> #
>> >> #   Written by Miquel van Smoorenburg .
>> >> #   Modified for Debian GNU/Linux by Ian Murdock
>> >> . #   Customized for Bacula by Jose Luis
>> >> Tallon  #
>> >>
>> >> . /lib/lsb/init-functions
>> >>
>> >> NAME="bacula-fd"
>> >> DESC="Bacula File daemon"
>> >> PATH=/sbin:/bin:/usr/sbin:/usr/bin
>> >> DAEMON=/usr/sbin/${NAME}
>> >> BUSER=root
>> >> BGROUP=root
>> >> PORT=9102
>> >> ARGS="-c /etc/bacula/${NAME}.conf"
>> >>
>> >> test -f $DAEMON || exit 0
>> >>
>> >> set -e
>> >>
>> >> if [ -n "`getent services bacula-fd`" ]; then
>> >>PORT=`getent services bacula-fd | awk '{ gsub("/tcp","",$2);
>> >> print $2; }'` fi
>> >>
>> >> . /lib/lsb/init-functions
>> >> . /usr/share/bacula-common/common-functions
>> >> create_var_run_dir
>> >>
>> >> PIDFILE=/var/run/bacula/$NAME.$PORT.pid
>> >>
>> >> do_start()
>> >> {
>> >>start-stop-daemon --start --quiet --pidfile $PIDFILE \
>> >>--exec $DAEMON -- $ARGS
>> >> }
>> >>
>> >

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

2015-08-10 Thread Jing Yang
Hi,
  I have been searching around a lot about “permission denied” errors, 
however, none of them matches my case. I am keeping getting Permission denied 
error on bacula-fd daemon. In the manual, it says that run the file system 
daemon as root. I am assuming it means the following,
"-rw-r- 1 root   bacula 1012 Mar  6  2013 bacula-fd.conf”
However, it seems not working at all. In addition, I keep other configuration 
files with user as bacula and group as bacula. Is this the correct? How can I 
check whether the daemon is running as root user or some others? What does the 
manual mean by “run file system daemon as root”? 

Thanks,
Jing



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