Skip to content

Adjust SELinux context for fbguard#9084

Open
Khalyutin wants to merge 1 commit into
FirebirdSQL:masterfrom
notesoft:work-install.sh
Open

Adjust SELinux context for fbguard#9084
Khalyutin wants to merge 1 commit into
FirebirdSQL:masterfrom
notesoft:work-install.sh

Conversation

@Khalyutin

Copy link
Copy Markdown
Contributor

Porblem:

RHEL 10 now prevent start services from not-standard folders.

: firebird.service: Unable to locate executable '/opt/firebird/bin/fbguard': Permission denied
: firebird.service: Failed at step EXEC spawning /opt/firebird/bin/fbguard: Permission denied

/opt/.../fbgurad not work as service in RHEL10 but work in Debian 13
/usr/bin/.../fbgurad work service as expected

https://groups.google.com/g/firebird-devel/c/-7DmsSesg3E


in@vm-host-s-redhat-work:~/Firebird-5.0.4.1812-0-linux-x64$ sudo ./install.sh

Firebird 5.0.4.1812-0.x64 Installation
Press Enter to start installation or ^C to abort
Extracting install data
Please enter new password for SYSDBA user: masterkey
Fatal error running 'systemctl --quiet start firebird.service' - exiting
in@vm-host-s-redhat-work:~/Firebird-5.0.4.1812-0-linux-x64$ sudo systemctl status firebird
× firebird.service - Firebird Database Server

     Loaded: loaded (/usr/lib/systemd/system/firebird.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Mon 2026-07-06 14:08:39 EEST; 4s ago
 Invocation: 87dcc4b27eb1417d812e868e9c8a7ced
       Docs: https://firebirdsql.org/en/firebird-rdbms/
    Process: 615891 ExecStart=/opt/firebird/bin/fbguard -daemon -forever (code=exited, status=203/EXEC)
   Mem peak: 1.2M
        CPU: 3ms

Jul 06 14:08:39 vm-host-s-redhat-work systemd[1]: Starting firebird.service - Firebird Database Server...
Jul 06 14:08:39 vm-host-s-redhat-work (fbguard)[615891]: firebird.service: Unable to locate executable '/opt/firebird/bin/fbguard': Permission denied
Jul 06 14:08:39 vm-host-s-redhat-work (fbguard)[615891]: firebird.service: Failed at step EXEC spawning /opt/firebird/bin/fbguard: Permission denied
Jul 06 14:08:39 vm-host-s-redhat-work systemd[1]: firebird.service: Control process exited, code=exited, status=203/EXEC
Jul 06 14:08:39 vm-host-s-redhat-work systemd[1]: firebird.service: Failed with result 'exit-code'.
Jul 06 14:08:39 vm-host-s-redhat-work systemd[1]: Failed to start firebird.service - Firebird Database Server.
in@vm-host-s-redhat-work:~/Firebird-5.0.4.1812-0-linux-x64$ 

Solution:

Add bin_t context to fbguard via chcon in install.sh

Test:
https://github.com/notesoft/SQLfb/tree/work-install.sh
Artifact download URL: https://github.com/notesoft/SQLfb/actions/runs/29092950440/artifacts/8227790862


Installed:
  libtomcrypt-1.18.2-21.el10_1.x86_64                                                                                                                                                                                    

Complete!
in@vm-host-s-redhat-work:~/Firebird-6.0.0.2070-Initial-linux-x64$ sudo ./install.sh

Firebird 6.0.0.2070-Initial.x64 Installation

Press Enter to start installation or ^C to abort
Extracting install data
Please enter new password for SYSDBA user: masterkey
/opt/firebird/bin/gsec: symbol lookup error: /opt/firebird/plugins/libSrp.so: undefined symbol: mp_ubin_size

Install completed
in@vm-host-s-redhat-work:~/Firebird-6.0.0.2070-Initial-linux-x64$ sudo systemctl status firebird
● firebird.service - Firebird Database Server
     Loaded: loaded (/usr/lib/systemd/system/firebird.service; enabled; preset: disabled)
     Active: active (running) since Sat 2026-07-11 10:03:32 EEST; 49s ago
 Invocation: 51da2a4a944d45479aee50ac30f42785
       Docs: https://firebirdsql.org/en/firebird-rdbms/
    Process: 1652545 ExecStart=/opt/firebird/bin/fbguard -daemon -forever (code=exited, status=0/SUCCESS)
   Main PID: 1652546 (fbguard)
      Tasks: 5 (limit: 22908)
     Memory: 15.7M (peak: 16M)
        CPU: 47ms
     CGroup: /system.slice/firebird.service
             ├─1652546 /opt/firebird/bin/fbguard -daemon -forever
             └─1652547 /opt/firebird/bin/firebird

Jul 11 10:03:32 vm-host-s-redhat-work systemd[1]: Starting firebird.service - Firebird Database Server...
Jul 11 10:03:32 vm-host-s-redhat-work systemd[1]: Started firebird.service - Firebird Database Server.
in@vm-host-s-redhat-work:~/Firebird-6.0.0.2070-Initial-linux-x64$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant