Icinga2 node wizard permission denied

Bug #1934507 reported by Tamas Valicsek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
icinga2 (Ubuntu)
New
Undecided
Unassigned

Bug Description

System:
lsb_release -rd
Description: Ubuntu 20.04.2 LTS
Release: 20.04

Package:
 apt-cache policy icinga2
icinga2:
  Installed: 2.11.2-1ubuntu3
  Candidate: 2.11.2-1ubuntu3
  Version table:
 *** 2.11.2-1ubuntu3 1111
       1111 http://hu.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

What I did:
sudo apt install icinga2
icinga2 node wizard (filled form)

Expected behaviour:
The wizard completed well, as in Ubuntu 18.04.

What happened instead:
I received:
critical/Application: Error: boost::filesystem::copy_file: Permission denied: "/etc/icinga2/features-available/api.conf", "/etc/icinga2/features-available/api.conf.orig"

Additional information is available in '/var/log/icinga2/crash/report.1625224048.083112'

Aborted

Crash report content:
Caught unhandled exception.
Current time: 2021-07-02 13:07:28 +0200

  Application version: r2.11.2-1

System information:
  Platform: Ubuntu
  Platform version: 20.04.2 LTS (Focal Fossa)
  Kernel: Linux
  Kernel version: 5.4.0-74-generic
  Architecture: x86_64

Build information:
  Compiler: GNU 9.2.1
  Build host: lcy01-amd64-022

Application information:

General paths:
  Config directory: /etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /run/icinga2

Old paths (deprecated):
  Installation root: /usr
  Sysconf directory: /etc
  Run directory (base): /run
  Local state directory: /var

Internal paths:
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid

Error: boost::filesystem::copy_file: Permission denied: "/etc/icinga2/features-available/api.conf", "/etc/icinga2/features-available/api.conf.orig"

 (0) libboost_filesystem.so.1.71.0: boost::filesystem::detail::copy_file(boost::filesystem::path const&, boost::filesystem::path const&, boost::filesystem::detail::copy_option, boost::system::error_code*) (+0x1f5) [0x7fc213de3065]
 (1) icinga2: icinga::Utility::CopyFile(icinga::String const&, icinga::String const&) (+0x60) [0x562fecae81f0]
 (2) icinga2: icinga::NodeUtility::CreateBackupFile(icinga::String const&, bool) (+0x98) [0x562fecd37758]
 (3) icinga2: icinga::NodeWizardCommand::AgentSatelliteSetup() const (+0x1e24) [0x562fecd4c614]
 (4) icinga2: icinga::NodeWizardCommand::Run(boost::program_options::variables_map const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const (+0x2c5) [0x562fecd51b15]
 (5) icinga2: <unknown function> (+0x562e75) [0x562fecaace75]
 (6) icinga2: main (+0xc2) [0x562feca9df32]
 (7) libc.so.6: __libc_start_main (+0xf3) [0x7fc21328b0b3]
 (8) icinga2: _start (+0x2e) [0x562fecaaa57e]

***
* This would indicate a runtime problem or configuration error. If you believe this is a bug in Icinga 2
* please submit a bug report at https://github.com/Icinga/icinga2 and include this stack trace as well as any other
* information that might be useful in order to reproduce this problem.
***
Failed to launch GDB: No such file or directory

I have NOT modified any owner:group

root@*******:~# ls -ld /etc/icinga2/
drwxr-x--- 8 nagios nagios 4096 Jul 2 13:06 /etc/icinga2/
root@*******:~# ls -lA /etc/icinga2/
total 36
drwxr-xr-x 2 root root 4096 Jul 2 13:06 conf.d
-rw-r--r-- 1 root root 998 Mar 5 2020 constants.conf
drwxr-xr-x 2 root root 4096 Jul 2 13:06 features-available
drwxr-x--- 2 nagios nagios 4096 Jul 2 13:07 features-enabled
-rw-r--r-- 1 root root 1721 Mar 5 2020 icinga2.conf
drwx------ 2 nagios nagios 4096 Mar 5 2020 pki
drwxr-xr-x 2 root root 4096 Jul 2 13:06 scripts
-rw-r--r-- 1 root root 1334 Mar 5 2020 zones.conf
drwxr-xr-x 2 root root 4096 Jul 2 13:06 zones.d

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1934507/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Tamas Valicsek (ewn-vata) wrote :

Filled package field

affects: ubuntu → icinga2 (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.