Re: [Leap 16.0] apache2 group wwwrun or www?

Robert Webb via openSUSE Users <[email protected]> Sun, 19 Jul 2026 17:50:25 +0000 (UTC)
Newsgroups gmane.linux.suse.general
Message-ID <[email protected]>
 On Sat, 18 Jul 2026 10:50:16 +0200, [email protected] wrote:
> On Samstag, 18. Juli 2026 08:46:07 Mitteleuropäische Sommerzeit Andrei Borzenkov wrote:
>> 18.07.2026 08:55, Robert Webb via openSUSE Users wrote:
>> >   On Fri, 17 Jul 2026 13:13:44 +0200, [email protected] wrote:
>> > 
>> >> on my Leap 16.0 web server apache is running as user wwwrun and group www, but there also exists a group named wwwrun.
>> >> Lately I got a few problems with Nextcloud, when updating modules, because some files had wwwrun:wwwrun set.
>> >> So I tried to find out, what the proper group settings might be, but really got confused:
>> >>
>> >> /etc/apache2/uid.conf
>> >>
>> >>           User wwwrun
>> >>           Group www
>> >>
>> >> /etc/passwd
>> >>
>> >> wwwrun:x:474:474:WWW daemon apache:/var/lib/wwwrun:/usr/sbin/nologin
>> >>
>> >> /etc/group
>> >>
>> >> www:x:479:wwwrun
>> >> wwwrun:!:474:
>> >>
>> >> /usr/lib/sysusers.d/system-user-wwwrun.conf
>> >>
>> >> # Type Name ID GECOS [HOME]
>> >> g www -
>> >> u wwwrun - "WWW daemon apache" /var/lib/wwwrun
>> >> m wwwrun www
>> >>
>> >> What is correct - www or wwwrun?
>> >> And why is it different in those configs?
>> > 
>> > The two *.conf files seem consistent, although I haven't checked
>> > documentation for them.  Don't they both indicate User: wwwrun and
>> > Group: www ?
>> > 
>> > So /etc/group has both www and wwwrun, group www with one user, wwwrun,
>> > and group wwwrun with no members (Is a user of the same name automatically
>> > a member of the group?).
>> 
>> Yes, systemd-sysusers will automatically create a unique group with the 
>> same name as user name for each user added by the "u" directive and use 
>> it as the primary group for this user.
>
> I never would have seen this, if the nextcloud module files wouldn't have had wwwrun:wwrun after the latest upgrade, which gave a few error messages in the nextcloud log.

Package 'apache2' requires "user(wwwrun)" and "group(www)".

Package 'system-user-wwwrun' provides those and its Summary is "System
user wwwrun and group www".  But "group(wwwrun)" is also one of the
provides, so the creation of both groups is expected.  See 'zypper if
...' below.

Your file group ownership problem is because user wwwrun's primary group
is wwwrun instead of www.  So I am guessing that it is a bug in package
'system-user-wwwrun'.

-----

BTW, in /usr/lib/sysusers.d/system-user-wwwrun.conf above, what does the
line "m wwwrun www" do?
- Never mind.  The man page sysusers.d(5) describes the file format.
It adds user wwwrun to group www.  But it does not make it the primary
group unless user wwwrun does not exist yet.

The 'u' line, as Andrei pointed out, sets a primary group of the same
name as the user, by default, but that can be changed if the dash is
replaced with "-:groupname" in the ID field.  And then the 'm' line
should be removed.

Now there would be no group wwwrun automatically created.  If that is
actually needed, then a 'g' line can be added for it:

 # Type Name ID GECOS [HOME]
 g www -
 u wwwrun -:www "WWW daemon apache" /var/lib/wwwrun
 g wwwrun -

-----

 # zypper if --provides --requires apache2 system-user-wwwrun  |sed -e 's/^./  &/' -e '/\<\(wwwrun\|www\)\>/s/^ /x/'
   Loading repository data...
   Reading installed packages...


   Information for package apache2:
   --------------------------------
   Repository     : repo-oss (16.0)
   Name           : apache2
   Version        : 2.4.66-160000.3.1
   Arch           : x86_64
 x Vendor         : SUSE LLC <https://www.suse.com/>
   Installed Size : 1.4 MiB
   Installed      : No
   Status         : not installed
   Source package : apache2-2.4.66-160000.3.1.src
   Upstream URL   : https://httpd.apache.org/
   Summary        : The Apache HTTPD Server
   Description    : 
       The Apache HTTP Server Project is an effort to develop and
       maintain an open-source HTTP server for modern operating
       systems including UNIX and Windows. The goal of this project
       is to provide a secure, efficient and extensible server that
       provides HTTP services in sync with the current HTTP standards.
   Provides       : [9]
       apache_mmn_20120211
       suse_maintenance_mmn_0
       http_daemon
       httpd
       apache2 = 2.4.66-160000.3.1
       apache2(x86-64) = 2.4.66-160000.3.1
       config(apache2) = 2.4.66-160000.3.1
       /usr/sbin/a2enmod
       /usr/sbin/a2enflag
   Requires       : [8]
       libc.so.6(GLIBC_2.38)(64bit)
       /bin/bash
       logrotate
       apache2-MPM
       /etc/mime.types
       /bin/sh
 x     user(wwwrun)
 x     group(www)


 x Information for package system-user-wwwrun:
   -------------------------------------------
   Repository     : repo-oss (16.0)
 x Name           : system-user-wwwrun
   Version        : 20170617-160000.2.2
   Arch           : noarch
 x Vendor         : SUSE LLC <https://www.suse.com/>
   Installed Size : 96 B
   Installed      : No
   Status         : not installed
   Source package : system-users-20170617-160000.2.2.src
 x Summary        : System user wwwrun and group www
   Description    : 
 x     This package provides the system account 'wwwrun' and group 'www'.
   Provides       : [4]
 x     user(wwwrun)
 x     group(www)
 x     group(wwwrun)
 x     system-user-wwwrun = 20170617-160000.2.2
   Requires       : [2]
       /bin/sh
       sysuser-shadow >= 3.2

-- 
Robert Webb