What is the equivalent of www-data in opensuse

I am hosting an application for my own consumption only - Lychee - so after a lot of struggle I am stuck with one last portion -

2022/09/19 22:06:18 [error] 11361#11361: *40 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0Unable to open primary script: /var/www/wallabag/web/app.php (Permission denied)" while reading respons
e header from upstream, client: 127.0.0.1, server: pop.wallabag.cerulean, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "pop.wallabag.cerulean"


my best guess is file level access issue -I am not sure which user should be given for this to work
I have given fpm sock access to nginx
tired giving folder access to nginx but its not working - any input suggestion

What is the equivalent of www-data in opensuse

Apparently you have seen a www-data somewhere, but you failed to tell where.
I think you can imagine that when it has an equivalent on openSUSE, the openSUSE users here may know that. But they probably do not know that the equivalent of what they know is www-data on a system they also not know. Or do you expect clairvoyance?

My sincere apologies. I have earlier used Ubuntu - in Ubuntu bases system there is a user www-data who is the user that web servers on Ubuntu (Apache, nignx) use by default for normal operation - so when a web site is self hosted the www-data is made the owner of the folders and directories through chown command.

I am not getting the equivalent of the same in Opensuse - I am using nginx and the files are located in www/var/lychee

I am stuck with the folder level permissions - whom to give.

On openSUSE a place is offered (but you can of course use what you need/want) at /srv. For the web /srv/www.

There is also:

henk@boven:~> grep www /etc/passwd
wwwrun:x:30:8:WWW daemon apache:/var/lib/wwwrun:/bin/false
henk@boven:~> grep www /etc/group
www:x:8:wwwrun
wwwrun:x:469:

I have no idea what Lychee is. It is not a package in the main repository, and searching for a package that provides also returns nothing.

Please understand that the knowledge you have about your project is not the same knowledge other openSUSE users have. So do not assume they will understand you when you just throw in a few words that mean much to you but that not automagicaly mean anything to others.

The starting point for any questions here is openSUSE, not Ubuntu, about which many may have heard of, but that is it.

With openSUSE there are better options than “a lot of struggle”:

  1. Use “yast2 sw_single” and install pattern lamp_server.
  2. Configure with “yast2 http-server” to obtain a working setup.
  3. Configure nginx based on the above experience.

This is my recommendation. But of course you are free to go with more struggle.

Hi, My bad not giving a clear description. Lychee is a self hosted website for organizing photos. I ideally host this web server on my system for personal use with no exposure to the internet.

I am using php 8, mysql and nginx. I have my Lychee folder containing the php and other files under /srv/www/Lychee.

When I try to access the site I get “Access Denied”. When I am going and checking in the /var/log/nginx/lychee.error.log I get the following error -

2022/09/20 18:43:58 [error] 2053#2053: *13 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0Unable to open primary script: /srv/www/Lychee/public/index.php (Permission denied)" while reading respon
se header from upstream, client: 127.0.0.1, server: pop.lychee.cerulean, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "pop.lychee.cerulean"

if I go to nginx conf file in /etc/nginx/nginx.conf then it contains the following -

user  wwwrun;
worker_processes  1;

if I go to /etc/php8/fpm/fpm/php-fpm.d/


; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
user = wwwrun
group = www
listen = /var/run/php-fpm/php-fpm.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660

I have changed the ownership of the folders using the comman sudo chown -R wwwrun:www /srv/www/Lychee and also used chmod -R 755 (also 777) /srv/www/Lychee

after all this I am still getting the same error - access denied - I know I am missing something very simple here - but not able to zero down on the same. Can you help ?

No, you do not.

/srv/www/Lychee/public/index.php (Permission denied)"

“Permission denied” and “Access denied” are two different error codes which are returned in different cases.

Does it work if you deactivate AppArmor with “aa-teardown”?

It is much clearer now. But it is still unclear to me where you got that Lychee. As I said, I can not find it in the openSUSE standard repo (but I might be wrong). Always, when software is not from the standard repos, explain where you get it from and how you installed.

In any case, the message says a permission denied with /srv/www/Lychee/public/index.php. So the first thing to study is

ls -l /srv/www/Lychee/public/index.php

And also

ls -ld /srv/www/Lychee/public/
ls -ld/srv/www/Lychee/
ls -ld /srv/www/
ls -ld /srv

Because you say you have changed permissions, but not exactly what, thus one should check the complete path.

Hi, Thanks for your inputs - I think am inching to closure - here is the update -

localhost:~ # ls -l /srv/www/Lychee/public/index.php-rwxr-xr-x 1 wwwrun www 2614 May 21 01:54 /srv/www/Lychee/public/index.php
localhost:~ # ls -ld /srv/www/Lychee/public/
drwxr-xr-x 11 wwwrun www 4096 May 21 01:54 /srv/www/Lychee/public/
localhost:~ # ls -ld /srv/www/Lychee/
drwxr-xr-x 16 wwwrun www 4096 May 21 01:58 /srv/www/Lychee/
localhost:~ # ls -ld /srv/www/
drwxr-xr-x 12 wwwrun www 4096 Sep 18 15:52 /srv/www/
localhost:~ # ls -ld /srv
dr-xr-xr-x 1 wwwrun www 22 Sep 17 14:26 /srv

I also disabled apparmor and then rebooted my laptop - when i restarted nginx.service and php-fpm and trying to access the website I am getting 502 error code. When I am looking into /var/log/nginx/lychee.error.log I can see the following error code -

2022/09/21 00:37:07 [crit] 13779#13779: *1 connect() to unix:/run/php-fpm/php-fpm.sock failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: pop.lychee.cerulean, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.
sock:", host: "pop.lychee.cerulean"


The owner details are as follows -

**localhost:/var/run/php-fpm #** ls -ld php-fpm.sock
srw-rw---- 1 nginx nginx 0 Sep 21 00:36 **php-fpm.sock**

**localhost:/run/php-fpm #** ls -ld php-fpm.sock
srw-rw---- 1 nginx nginx 0 Sep 21 00:36 **php-fpm.sock**


what should be my approach now ? it seems the earlier issues were because of apparmor because other then disabling it i havent made any changes in the owner ships.

You disabled it how exactly? Show commands that you used.

and then rebooted my laptop

And you verified that AppArmor is not active after reboot?

Installed and started nginx here:

**6700K:~ #** systemctl status nginx.service  
**●** nginx.service - The nginx HTTP and reverse proxy server 
     Loaded: loaded (/etc/systemd/system/nginx.service; **disabled**; preset: **disabled**) 
     Active: **active (running)** since Wed 2022-09-21 06:47:03 CEST; 8min ago 
    Process: 7659 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS) 
   Main PID: 7660 (nginx) 
      Tasks: 2 (limit: 4915) 
        CPU: 13ms 
     CGroup: /system.slice/nginx.service 
             ├─7660 "nginx: master process /usr/sbin/nginx -g daemon off;"
             └─7663 "nginx: worker process"

Sep 21 06:47:03 6700K systemd[1]: Starting The nginx HTTP and reverse proxy server... 
Sep 21 06:47:03 6700K nginx[7659]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok 
Sep 21 06:47:03 6700K nginx[7659]: nginx: configuration file /etc/nginx/nginx.conf test is successful 
Sep 21 06:47:03 6700K systemd[1]: Started The nginx HTTP and reverse proxy server. 
**6700K:~ #**

Tried to open and ran into permission problem:

**6700K:~ #** cat /srv/www/htdocs/phpinfo.php 
<?php 
phpinfo(); 
X?> 
**6700K:~ #**

Compared apache2 with nginx. Removed hardening from nginx and restarted:

[FONT=monospace]**6700K:~ #** systemctl cat nginx.service  
**# /etc/systemd/system/nginx.service**
[Unit] 
Description=The nginx HTTP and reverse proxy server 
After=network-online.target remote-fs.target nss-lookup.target 
Wants=network-online.target 

[Service] 
PIDFile=/run/nginx.pid 
ExecStartPre=/usr/sbin/nginx -t 
ExecStart=/usr/sbin/nginx -g "daemon off;" 
ExecReload=/bin/kill -s HUP $MAINPID 
KillSignal=SIGQUIT 
TimeoutStopSec=5 
KillMode=mixed 
PrivateTmp=true 
[Install] 
WantedBy=multi-user.target 
**6700K:~ #**[/FONT]

localhost now readily displays the info page.

Hi, I disabled it from YAST -> Services Manager -> apparmor
Now when I log into YAST Services Manager I can see that the status is Start (On Boot) State (Active Exited) but I guess I did something wrong here -

**localhost:~ #** cat /sys/kernel/security/apparmor/profiles
snap.snap-store.snap-store (enforce)
snap.snap-store.ubuntu-software (enforce)
snap.mailspring.hook.configure (enforce)
snap.simplenote.simplenote (enforce)
snap.simplenote.hook.configure (enforce)
snap.snap-store.ubuntu-software-local-file (enforce)
snap.rambox.rambox (enforce)
snap.opera.opera (enforce)
snap.snap-store.hook.configure (enforce)
snap.opera.hook.configure (enforce)
snap-update-ns.falkon (enforce)
snap-update-ns.simplenote (enforce)
snap.falkon.falkon (enforce)
snap-update-ns.snap-store (enforce)
snap.falkon.hook.configure (enforce)
snap.mailspring.mailspring (enforce)
snap-update-ns.rambox (enforce)
snap-update-ns.opera (enforce)
snap-update-ns.mailspring (enforce)
/snap/snapd/16778/usr/lib/snapd/snap-confine (enforce)
/snap/snapd/16778/usr/lib/snapd/snap-confine//mount-namespace-capture-helper (enforce)
/usr/share/gitweb/gitweb.cgi (enforce)
winbindd (enforce)
dovecot-pop3 (enforce)
zgrep (enforce)
zgrep//sed (enforce)
zgrep//helper (enforce)
mdnsd (enforce)
nscd (enforce)
nmbd (enforce)
traceroute (enforce)
smbldap-useradd (enforce)
smbldap-useradd///etc/init.d/nscd (enforce)
ntpd (enforce)
avahi-daemon (enforce)
smbd (enforce)
dovecot-dovecot-lda (enforce)
dovecot-dovecot-lda//sendmail (enforce)
dnsmasq (enforce)
dnsmasq//libvirt_leaseshelper (enforce)
/usr/libexec/snapd/snap-confine (enforce)
/usr/libexec/snapd/snap-confine//mount-namespace-capture-helper (enforce)
dovecot (enforce)
dovecot-script-login (enforce)
identd (enforce)
dovecot-ssl-params (enforce)
apache2 (enforce)
apache2//phpsysinfo (enforce)
apache2//HANDLING_UNTRUSTED_INPUT (enforce)
apache2//DEFAULT_URI (enforce)
dovecot-managesieve (enforce)
dovecot-pop3-login (enforce)
dovecot-stats (enforce)
dovecot-imap-login (enforce)
dovecot-dovecot-auth (enforce)
syslog-ng (enforce)
dovecot-lmtp (enforce)
dovecot-managesieve-login (enforce)
dovecot-log (enforce)
klogd (enforce)
syslogd (enforce)
dovecot-anvil (enforce)
dovecot-imap (enforce)
dovecot-config (enforce)
dovecot-deliver (enforce)
dovecot-dict (enforce)
dovecot-auth (enforce)
/usr/bin/lessopen.sh (enforce)
php-fpm (enforce)
samba-dcerpcd (enforce)
samba-bgqd (enforce)
samba-rpcd (enforce)
samba-rpcd-spoolss (enforce)
samba-rpcd-classic (enforce)
ghostscript (enforce)
ghostscript///usr/bin/hpijs (complain)
ping (enforce)
nvidia_modprobe (enforce)
nvidia_modprobe//kmod (enforce)
lsb_release (enforce)

**localhost:~ #** sudo apparmor_status
apparmor module is loaded.
80 profiles are loaded.
79 profiles are in enforce mode.
   /snap/snapd/16778/usr/lib/snapd/snap-confine
   /snap/snapd/16778/usr/lib/snapd/snap-confine//mount-namespace-capture-helper
   /usr/bin/lessopen.sh
   /usr/libexec/snapd/snap-confine
   /usr/libexec/snapd/snap-confine//mount-namespace-capture-helper
   /usr/share/gitweb/gitweb.cgi
   apache2
   apache2//DEFAULT_URI
   apache2//HANDLING_UNTRUSTED_INPUT
   apache2//phpsysinfo
   avahi-daemon
   dnsmasq
   dnsmasq//libvirt_leaseshelper
   dovecot
   dovecot-anvil
   dovecot-auth
   dovecot-config
   dovecot-deliver
   dovecot-dict
   dovecot-dovecot-auth
   dovecot-dovecot-lda
   dovecot-dovecot-lda//sendmail
   dovecot-imap
   dovecot-imap-login
   dovecot-lmtp
   dovecot-log
   dovecot-managesieve
   dovecot-managesieve-login
   dovecot-pop3
   dovecot-pop3-login
   dovecot-script-login
   dovecot-ssl-params
   dovecot-stats
   ghostscript
   identd
   klogd
   lsb_release
   mdnsd
   nmbd
   nscd
   ntpd
   nvidia_modprobe
   nvidia_modprobe//kmod
   php-fpm
   ping
   samba-bgqd
   samba-dcerpcd
   samba-rpcd
   samba-rpcd-classic
   samba-rpcd-spoolss
   smbd
   smbldap-useradd
   smbldap-useradd///etc/init.d/nscd
   snap-update-ns.falkon
   snap-update-ns.mailspring
   snap-update-ns.opera
   snap-update-ns.rambox
   snap-update-ns.simplenote
   snap-update-ns.snap-store
   snap.falkon.falkon
   snap.falkon.hook.configure
   snap.mailspring.hook.configure
   snap.mailspring.mailspring
   snap.opera.hook.configure
   snap.opera.opera
   snap.rambox.rambox
   snap.simplenote.hook.configure
   snap.simplenote.simplenote
   snap.snap-store.hook.configure
   snap.snap-store.snap-store
   snap.snap-store.ubuntu-software
   snap.snap-store.ubuntu-software-local-file
   syslog-ng
   syslogd
   traceroute
   winbindd
   zgrep
   zgrep//helper
   zgrep//sed
1 profiles are in complain mode.
   ghostscript///usr/bin/hpijs
0 profiles are in kill mode.
0 profiles are in unconfined mode.
23 processes have profiles defined.
23 processes are in enforce mode.
   /usr/sbin/avahi-daemon (1804) avahi-daemon
   /usr/sbin/nscd (1944) nscd
   /usr/sbin/php-fpm (2076) php-fpm
   /usr/sbin/php-fpm (2170) php-fpm
   /usr/sbin/php-fpm (2171) php-fpm
   /snap/rambox/21/rambox (2652) snap.rambox.rambox
   /snap/rambox/21/rambox (3027) snap.rambox.rambox
   /snap/rambox/21/rambox (3028) snap.rambox.rambox
   /snap/rambox/21/rambox (3088) snap.rambox.rambox
   /snap/rambox/21/rambox (3100) snap.rambox.rambox
   /snap/rambox/21/rambox (3132) snap.rambox.rambox
   /snap/rambox/21/rambox (3900) snap.rambox.rambox
   /snap/rambox/21/rambox (3920) snap.rambox.rambox
   /snap/rambox/21/rambox (3937) snap.rambox.rambox
   /snap/rambox/21/rambox (3952) snap.rambox.rambox
   /snap/rambox/21/rambox (4072) snap.rambox.rambox
   /snap/rambox/21/rambox (4085) snap.rambox.rambox
   /snap/rambox/21/rambox (4141) snap.rambox.rambox
   /snap/rambox/21/rambox (4203) snap.rambox.rambox
   /snap/rambox/21/rambox (4273) snap.rambox.rambox
   /snap/rambox/21/rambox (4325) snap.rambox.rambox
   /snap/rambox/21/rambox (4381) snap.rambox.rambox
   /snap/rambox/21/rambox (4457) snap.rambox.rambox
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.
0 processes are in mixed mode.
0 processes are in kill mode.

When I am trying to do it from command line now -

**localhost:~ #** service boot.apparmor stop
service: no such service boot.apparmor

**localhost:~ #** yast runlevel delete service=boot.apparmor
No such client module runlevel

Is it apparmor which is causing the trouble ?

I do not know. I asked you to verify it by deactivating AppArmor and am still waiting for an answer.

You can also check AppArmor logs for any errors related to your software.

Nope. It’s the automatic hardening:

**6700K:~ #** systemd-delta --type overridden  
**[OVERRIDDEN]** /etc/systemd/system/nginx.service → /usr/lib/systemd/system/nginx.service 

--- /usr/lib/systemd/system/nginx.service       2021-10-11 11:27:49.000000000 +0200 
+++ /etc/systemd/system/nginx.service   2022-09-21 06:40:16.594139947 +0200 
@@ -12,19 +12,5 @@ 
 TimeoutStopSec=5 
 KillMode=mixed 
 PrivateTmp=true 
**-# added automatically, for details please see 
-# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort 
-ProtectSystem=full 
-ProtectHome=read-only 
-PrivateDevices=true 
-ProtectHostname=true 
-ProtectClock=true 
-ProtectKernelTunables=true 
-ProtectKernelModules=true 
-ProtectKernelLogs=true 
-ProtectControlGroups=true 
-RestrictRealtime=true 
-# end of automatic additions  
-** 
 [Install] 
-WantedBy=multi-user.target 
+WantedBy=multi-user.target 
\ No newline at end of file 

Hi karlmistelberger,

How do I remove the automatic hardening, you are able to make it run on your local system, can you please share what you have done.

If apparmor is not the issue can I activate it again ?

Thank you so much in advance.

Vendor version of nginx is:

[FONT=monospace]**6700K:~ #** systemctl cat nginx 
[/FONT][FONT=monospace]**[FONT=monospace]**# /usr/lib/systemd/system/nginx.service**
[Unit] 
Description=The nginx HTTP and reverse proxy server 
After=network-online.target remote-fs.target nss-lookup.target 
Wants=network-online.target 

[Service] 
PIDFile=/run/nginx.pid 
ExecStartPre=/usr/sbin/nginx -t 
ExecStart=/usr/sbin/nginx -g "daemon off;" 
ExecReload=/bin/kill -s HUP $MAINPID 
KillSignal=SIGQUIT 
TimeoutStopSec=5 
KillMode=mixed 
PrivateTmp=true 
*# added automatically, for details please see 
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort 
ProtectSystem=full 
ProtectHome=read-only 
PrivateDevices=true 
ProtectHostname=true 
ProtectClock=true 
ProtectKernelTunables=true 
ProtectKernelModules=true 
ProtectKernelLogs=true 
ProtectControlGroups=true 
RestrictRealtime=true 
# end of automatic additions*  

[Install] 
WantedBy=multi-user.target 
**6700K:~ #** [/FONT]

**[/FONT]To create a local version run “systemctl edit --full nginx” in a root shell, delete the automatic additions and save your edit. Restart nginx.

If apparmor is not the issue can I activate it again?

Yep.

According to the output you provided AppArmor is active.

I tried doing the same. but I dont know why but my issue is still not resolved am still stuck with the 502 error code.

2022/09/22 21:22:11 [error] 9000#9000: *1 FastCGI sent in stderr: "PHP message: PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0Unable to open primary script: /srv/www/Lychee/public/index.php (Permission denied)" while reading respons
e header from upstream, client: 127.0.0.1, server: pop.lychee.cerulean, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm/php-fpm.sock:", host: "pop.lychee.cerulean"


For some strange reason this is an issue with php files only. I created one html file and it works fine.

What else can I share for a more accurate analysis?

Don’t tinker. Do it the openSUSE way:

  1. disable nginx.
  2. install LAMP Server
  3. disable apache2
  4. enable nginx

Install:

**erlangen-b:~ #** **time zypper --non-interactive install --type pattern lamp_server**  
Loading repository data... 
Reading installed packages... 
Resolving package dependencies... 

The following 15 recommended packages were automatically selected:
  apache2-manual apache2-mod_php7 apache2-prefork apache2-utils php7-ctype php7-dom php7-iconv php7-json php7-openssl php7-sqlite 
  php7-tokenizer php7-xmlreader php7-xmlwriter w3m yast2-http-server 

The following 22 NEW packages are going to be installed:
  apache2 apache2-manual apache2-mod_php7 apache2-prefork apache2-utils libgc1 patterns-base-basesystem 
  patterns-server-lamp_server php7 php7-ctype php7-dom php7-iconv php7-json php7-openssl php7-pdo php7-sqlite php7-tokenizer 
  php7-xmlreader php7-xmlwriter system-user-wwwrun w3m yast2-http-server 

The following 2 NEW patterns are going to be installed:
  basesystem lamp_server 

22 new packages to install. 
Overall download size: 0 B. Already cached: 9.0 MiB. After the operation, additional 35.9 MiB will be used. 
**Continue? [y/n/v/...? shows all options] (y): **y 
In cache apache2-manual-2.4.54-4.1.noarch.rpm                                              (1/22),   3.8 MiB ( 21.7 MiB unpacked) 
In cache apache2-prefork-2.4.54-4.1.x86_64.rpm                                             (2/22),   1.3 MiB (  4.3 MiB unpacked) 
In cache libgc1-8.2.2-1.1.x86_64.rpm                                                       (3/22), 104.9 KiB (249.2 KiB unpacked) 
In cache patterns-base-basesystem-20200505-38.1.x86_64.rpm                                 (4/22),  23.9 KiB (   56   B unpacked) 
In cache system-user-wwwrun-20170617-24.11.noarch.rpm                                      (5/22),  10.3 KiB (   96   B unpacked) 
In cache yast2-http-server-4.5.1-1.1.noarch.rpm                                            (6/22),  78.5 KiB (372.6 KiB unpacked) 
In cache w3m-0.5.3+git20180125-1.19.x86_64.rpm                                             (7/22),   1.0 MiB (  2.2 MiB unpacked) 
In cache apache2-utils-2.4.54-4.1.x86_64.rpm                                               (8/22), 168.8 KiB (285.2 KiB unpacked) 
In cache apache2-2.4.54-4.1.x86_64.rpm                                                     (9/22), 476.6 KiB (  1.4 MiB unpacked) 
In cache php7-7.4.30-1.3.x86_64.rpm                                                       (10/22),  95.5 KiB (240.3 KiB unpacked) 
In cache apache2-mod_php7-7.4.30-1.2.x86_64.rpm                                           (11/22),   1.5 MiB (  4.4 MiB unpacked) 
In cache php7-dom-7.4.30-1.3.x86_64.rpm                                                   (12/22),  80.6 KiB (180.3 KiB unpacked) 
In cache patterns-server-lamp_server-20210330-2.7.x86_64.rpm                              (13/22),   9.4 KiB (   57   B unpacked) 
In cache php7-openssl-7.4.30-1.3.x86_64.rpm                                               (14/22),  88.4 KiB (190.2 KiB unpacked) 
In cache php7-ctype-7.4.30-1.3.x86_64.rpm                                                 (15/22),  29.2 KiB ( 14.4 KiB unpacked) 
In cache php7-iconv-7.4.30-1.3.x86_64.rpm                                                 (16/22),  43.8 KiB ( 46.9 KiB unpacked) 
In cache php7-json-7.4.30-1.3.x86_64.rpm                                                  (17/22),  44.4 KiB ( 46.8 KiB unpacked) 
In cache php7-pdo-7.4.30-1.3.x86_64.rpm                                                   (18/22),  67.4 KiB (115.6 KiB unpacked) 
In cache php7-sqlite-7.4.30-1.3.x86_64.rpm                                                (19/22),  54.4 KiB ( 94.6 KiB unpacked) 
In cache php7-tokenizer-7.4.30-1.3.x86_64.rpm                                             (20/22),  33.8 KiB ( 22.6 KiB unpacked) 
In cache php7-xmlreader-7.4.30-1.3.x86_64.rpm                                             (21/22),  37.3 KiB ( 35.0 KiB unpacked) 
In cache php7-xmlwriter-7.4.30-1.3.x86_64.rpm                                             (22/22),  39.0 KiB ( 55.0 KiB unpacked) 

Checking for file conflicts: ..............................................................................................[done] 
( 1/22) Installing: apache2-manual-2.4.54-4.1.noarch ......................................................................[done] 
( 2/22) Installing: apache2-prefork-2.4.54-4.1.x86_64 .....................................................................[done] 
( 3/22) Installing: libgc1-8.2.2-1.1.x86_64 ...............................................................................[done] 
( 4/22) Installing: patterns-base-basesystem-20200505-38.1.x86_64 .........................................................[done] 
/usr/bin/systemd-sysusers --replace=/usr/lib/sysusers.d/system-user-wwwrun.conf -
Creating group 'www' with GID 455.
Creating group 'wwwrun' with GID 454.
Creating user 'wwwrun' (WWW daemon apache) with UID 454 and GID 454.
( 5/22) Installing: system-user-wwwrun-20170617-24.11.noarch ..............................................................[done] 
( 6/22) Installing: yast2-http-server-4.5.1-1.1.noarch ....................................................................[done] 
( 7/22) Installing: w3m-0.5.3+git20180125-1.19.x86_64 .....................................................................[done] 
( 8/22) Installing: apache2-utils-2.4.54-4.1.x86_64 .......................................................................[done] 
Please check /etc/permissions.local for settings of /usr/sbin/suexec .
Updating /etc/sysconfig/apache2 ...
( 9/22) Installing: apache2-2.4.54-4.1.x86_64 .............................................................................[done] 
(10/22) Installing: php7-7.4.30-1.3.x86_64 ................................................................................[done] 
(11/22) Installing: apache2-mod_php7-7.4.30-1.2.x86_64 ....................................................................[done] 
(12/22) Installing: php7-dom-7.4.30-1.3.x86_64 ............................................................................[done] 
(13/22) Installing: patterns-server-lamp_server-20210330-2.7.x86_64 .......................................................[done] 
(14/22) Installing: php7-openssl-7.4.30-1.3.x86_64 ........................................................................[done] 
(15/22) Installing: php7-ctype-7.4.30-1.3.x86_64 ..........................................................................[done] 
(16/22) Installing: php7-iconv-7.4.30-1.3.x86_64 ..........................................................................[done] 
(17/22) Installing: php7-json-7.4.30-1.3.x86_64 ...........................................................................[done] 
(18/22) Installing: php7-pdo-7.4.30-1.3.x86_64 ............................................................................[done] 
(19/22) Installing: php7-sqlite-7.4.30-1.3.x86_64 .........................................................................[done] 
(20/22) Installing: php7-tokenizer-7.4.30-1.3.x86_64 ......................................................................[done] 
(21/22) Installing: php7-xmlreader-7.4.30-1.3.x86_64 ......................................................................[done] 
(22/22) Installing: php7-xmlwriter-7.4.30-1.3.x86_64 ......................................................................[done] 
Executing %posttrans scripts ..............................................................................................[done] 

real    0m11.731s 
user    0m2.589s 
sys     0m2.695s 
**erlangen-b:~ #**

It’s done in a few seconds.

Result of running your application with AppArmor inactive.