Interesting. I can run that command as my non-root user and get output for
working from my rocky linux 9 system running bacula 13.x.

Your permissions seem similar to mine, though the groups lack write and my
groups do have write permissions. I imagine since these are user's groups
(root should probably be only member of root group, i think), and bacula is
probably the only member of the bacula group, so group permissions probably
aren't messing things up.

For your information, and in the hopes that it might help, here is my
output of the same command. I will note that i use rocky linux 9, and use
postgres sql. Are you using mariadb or some other mysql variant?

[gerber@NSF-rocky ~]$ ls -lah /opt/bacula/ /opt/bacula/working/
/opt/bacula/:
total 116K
drwxrwxr-x+ 11 root   root   4.0K Sep 13 14:17 .
drwxr-xr-x.  4 root   root   4.0K Sep 13 14:13 ..
drwxrwxr-x+  3 bacula disk   4.0K Oct 20 12:25 archive
drwxrwxr-x+  2 root   root   4.0K Sep 13 14:13 bin
drwxrwxr-x+  2 bacula bacula  32K Mar  5 23:10 bsr
drwxrwx---+  2 root   bacula 4.0K Dec  7 15:27 etc
drwxrwxr-x+  2 root   root   4.0K Sep 13 14:13 lib
drwxrwxr-x+  2 root   root   4.0K Sep 13 14:13 plugins
drwxrwx--x+  2 root   bacula 4.0K Sep 13 14:13 scripts
drwxrwxr-x+  3 root   root   4.0K Sep 13 14:13 share
drwxrwx---+  2 bacula bacula 4.0K Mar  5 23:10 working

/opt/bacula/working/:
total 188K
drwxrwx---+  2 bacula bacula 4.0K Mar  5 23:10 .
drwxrwxr-x+ 11 root   root   4.0K Sep 13 14:17 ..
-rw-rwx---+  1 bacula bacula  185 Sep 13 14:28 BackupCatalog.bsr
-rw-r-----.  1 root   root      7 Feb 15 18:45 bacula-dir.9101.pid
-rw-r-----.  1 bacula bacula 2.2K Mar  5 23:10 bacula-dir.9101.state
-rw-r-----.  1 root   root      7 Feb 15 18:45 bacula-fd.9102.pid
-rw-r-----.  1 root   bacula 2.2K Mar  5 23:10 bacula-fd.9102.state
-rw-r-----.  1 root   root      7 Feb 15 18:45 bacula-sd.9103.pid
-rw-r-----.  1 bacula disk   2.2K Mar  5 23:10 bacula-sd.9103.state
-rw-rwx---+  1 bacula disk    110 Sep 13 16:18 .bash_history
-rw-------.  1 bacula disk    117 Jan 24 23:05 mtx.err.8xDPEyJT5b
-rw-------.  1 bacula disk    117 Jan 27 17:11 mtx.err.AcHpsIA9Cx
-rw-------.  1 bacula disk    117 Jan 25 23:05 mtx.err.btDFhzON4H
-rw-------.  1 bacula disk    117 Jan 23 23:05 mtx.err.j7nS9XR4C7
-rw-rwx---+  1 bacula disk      0 Sep 13 16:44 mtx.err.JdWJtwAof2
-rw-------.  1 bacula disk    117 Jan 27 17:21 mtx.err.jYjrvdFyCj
-rw-------.  1 bacula disk    117 Jan 26 23:05 mtx.err.oDsJedWFLy
-rw-------.  1 bacula disk    117 Jan 27 23:05 mtx.err.ovsDIAmQp7
-rw-------.  1 bacula disk    117 Feb  6 23:05 mtx.err.vEQ2lKOqrd
-rw-------.  1 bacula disk    117 Feb  7 23:05 mtx.err.Xz0BEvLDL2
-rw-rwx---+  1 bacula bacula  78K Mar  5 23:10 nsf-rocky-dir.conmsg
-rw-rwx---+  1 bacula bacula    0 Sep 13 14:28 NSF-rocky-dir.conmsg

Something neat that chatgpt noticed: your BackupCatalog.bsr is owned by
root. I think it should be owned by bacula:bacula. Please note that mine is
owned by bacula:bacula.

chatgpt suggests (and I agree) that you chown BackupCatalog.bsr to
bacula:bacula.
sudo chown bacula:bacula /opt/bacula/working/BackupCatalog.bsr

Additionally, what user is running your mysql server? Chatgpt thinks they
might lack appropriate access to the database.

What user is running your bacula daemons? please reply with the output of
ps aux|grep bacula

and in an attempt to find what user is running your mysql daemons (though
my ignorance regarding mysql might be severe enough that this information
could be useless to us),
ps aux|grep sql

here is my output from ps aux|grep bacula
[gerber@NSF-rocky ~]$ ps aux|grep bacula
apache      1541  0.0  0.0  11804  2908 ?        S    Jan28   1:20
/usr/sbin/lighttpd -f /etc/bacularis/bacularis-lighttpd.conf
bacula    531384  0.6  0.0 602708 11236 ?        Ssl  Feb15 188:42
/opt/bacula/bin/bacula-sd -u bacula -g disk -v -c
/opt/bacula/etc/bacula-sd.conf
root      531394  0.7  0.0 676260 20728 ?        Ssl  Feb15 224:15
/opt/bacula/bin/bacula-fd -u root -g bacula -v -c
/opt/bacula/etc/bacula-fd.conf
bacula    531403  0.0  0.0 1351572 11952 ?       Ssl  Feb15   1:00
/opt/bacula/bin/bacula-dir -u bacula -g bacula -v -c
/opt/bacula/etc/bacula-dir.conf
gerber   3689255  0.0  0.0 221796  2296 pts/0    R+   13:22   0:00 grep
--color=auto bacula


Regards,
Robert Gerber
402-237-8692
r...@craeon.net


On Wed, Mar 6, 2024 at 1:05 PM Ken Mandelberg <k...@mathcs.emory.edu> wrote:

> I had to run 'ls -lah /opt/bacula/ /opt/bacula/working/ as root to get
> access to working:
>
> /opt/bacula/:
> total 44K
> drwxr-xr-x 11 root   root   4.0K Jul 11  2023 .
> drwxr-xr-x  9 root   root   4.0K Feb 12 12:33 ..
> drwx------  2 bacula root   4.0K May  3  2023 archive
> drwxr-xr-x  2 root   root   4.0K Oct 25 10:19 bin
> drwxr-x---  2 bacula bacula 4.0K May  3  2023 bsr
> drwxr-x---  2 bacula bacula 4.0K Oct 25 10:19 etc
> drwxr-xr-x  2 root   root   4.0K Oct 25 10:19 lib
> drwxr-x---  2 bacula adm    4.0K Aug  1  2023 log
> drwxr-xr-x  2 root   root   4.0K Oct 25 10:19 plugins
> drwxr-xr-x  3 root   root   4.0K Dec 28 11:35 scripts
> drwxr-x---  3 bacula bacula 4.0K Mar  6 12:29 working
>
> /opt/bacula/working/:
> total 622M
> drwxr-x---  3 bacula bacula 4.0K Mar  6 12:29 .
> drwxr-xr-x 11 root   root   4.0K Jul 11  2023 ..
> -rw-r--r--  1 root   root    190 Jul 11  2023 BackupCatalog.bsr
> -rw-r-----  1 bacula bacula 2.2K Mar  6 12:28 bacula-dir.9101.state
> -rw-r--r--  1 root   root    414 Jul 11  2023
> bacula-dir.bacula-dir.-1636748120.mail
> -rw-r-----  1 root   root   2.2K Mar  6 12:28 bacula-fd.9102.state
> -rw-r-----  1 bacula tape      5 Mar  6 12:29 bacula-sd.9103.pid
> -rw-r-----  1 bacula tape   2.2K Mar  6 12:28 bacula-sd.9103.state
> -rw-------  1 bacula bacula 622M Mar  5 23:19 bacula.sql
> drwx------  2 bacula root   4.0K May  3  2023 bkp
> -rw-------  1 bacula bacula   56 Mar  5 23:19 .my.cnf
> -rw-------  1 bacula bacula    0 Mar  6 12:07 orac-dir.conmsg
> -rw-r--r--  1 bacula root    19K Mar  5 23:19 orac-fd.bsr
>
>
>
>
> Rob Gerber wrote on 3/6/24 13:57:
>
> I am concerned that these backups might not be successful (in the sense
> that they are quite probably not actually backing your catalog up). If the
> catalog export via "/opt/bacula/scripts/make_catalog_backup.pl
> <https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmake_catalog_backup.pl%2F&data=05%7C02%7Ckm%40mathcs.emory.edu%7C5f4f45453a1e48ddc3e208dc3e0f5d81%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638453482917134191%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=zYK5okl%2F2Zbm2EHPgxk3OF8dsy%2FpHnc12rpYWZg6bpg%3D&reserved=0>
> MyCatalog" is not successful and if bacula cannot access the bacula.sql
> file written to /opt/bacula/working/bacula.sql then I'd be very concerned
> that the backups did not succeed in their purpose.
>
> Obviously you likely hold said concern because you messaged the list. I
> just want to make that clear.
>
> While I don't know everything one would need to know to troubleshoot this
> issue, I want to check something:
>
> When you do an 'ls -lah /opt/bacula/ /opt/bacula/working/' what is your
> output?
>
>
> Robert Gerber
> 402-237-8692
> r...@craeon.net
>
> On Wed, Mar 6, 2024, 12:29 PM Ken Mandelberg <k...@mathcs.emory.edu> wrote:
>
>> I I notice these two permission errors in my logs. I'm on Ubuntu. What do I 
>> need to do to correct them.
>> The backups succeed but I guess they are missing info.
>>
>> 05-Mar 23:19 orac-dir JobId 7661: shell command: run BeforeJob 
>> "/opt/bacula/scripts/make_catalog_backup.pl 
>> <https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmake_catalog_backup.pl%2F&data=05%7C02%7Ckm%40mathcs.emory.edu%7C5f4f45453a1e48ddc3e208dc3e0f5d81%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638453482917134191%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=zYK5okl%2F2Zbm2EHPgxk3OF8dsy%2FpHnc12rpYWZg6bpg%3D&reserved=0>
>>  MyCatalog"05-Mar 23:19 orac-dir JobId 7661: BeforeJob: mysqldump: Error: 
>> 'Access denied; you need (at least one of) the PROCESS privilege(s) for this 
>> operation' when trying to dump tablespaces
>> 05-Mar 23:19 orac-dir JobId 7661: Start Backup JobId 7661, 
>> Job=BackupCatalog.2024-03-05_23.10.00_05
>> 05-Mar 23:19 orac-dir JobId 7661: Connected to Storage "File" at 
>> localhost:9103 with TLS
>> 05-Mar 23:19 orac-dir JobId 7661: Using Device "FileStorage" to write.
>> 05-Mar 23:19 orac-dir JobId 7661: Connected to Client "orac-fd" at orac:9102 
>> with TLS
>> 05-Mar 23:19 orac-fd JobId 7661: Connected to Storage at localhost:9103 with 
>> TLS
>> 05-Mar 23:19 orac-sd JobId 7661: Volume "Vol0010" previously written, moving 
>> to end of data.
>> 05-Mar 23:19 orac-sd JobId 7661: Ready to append to end of Volume "Vol0010" 
>> size=52,690,472,345
>> 05-Mar 23:19 orac-sd JobId 7661: Elapsed time=00:00:02, Transfer rate=325.8 
>> M Bytes/second
>> 05-Mar 23:19 orac-sd JobId 7661: Sending spooled attrs to the Director. 
>> Despooling 233 bytes ...05-Mar 23:19 orac-dir JobId 7661: Error: Could not 
>> open WriteBootstrap file:/opt/bacula/working/BackupCatalog.bsr: 
>> ERR=Permission denied05-Mar 23:19 orac-dir JobId 7661: Error: Bacula 
>> Enterprise orac-dir 13.0.3 (02May23):
>>   Build OS:               x86_64-pc-linux-gnu-bacula-enterprise ubuntu 22.04
>>
>> _______________________________________________
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>> <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fbacula-users&data=05%7C02%7Ckm%40mathcs.emory.edu%7C5f4f45453a1e48ddc3e208dc3e0f5d81%7Ce004fb9cb0a4424fbcd0322606d5df38%7C0%7C0%7C638453482917290456%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=%2Bp0CFehtOTzds4Nc9%2F5jyOognuBHT7Qq7iSrqUh%2BoRg%3D&reserved=0>
>>
>
>
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to