From nobody Tue Mar 5 20:14:06 2024 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tq6GQ4ls8z5DLKJ for ; Tue, 5 Mar 2024 20:14:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tq6GQ35DXz4j5V for ; Tue, 5 Mar 2024 20:14:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709669646; a=rsa-sha256; cv=none; b=RPPG621Y60W4X5qNoad/UxdXA5tq6KODxPCtfjq8wnaRsZWdLsgaHxOLnZYT1vP5IpzBe4 7PhnTN3FHlTZ/RI8+3bx3WbVX+jy+msFXjhVMbqtTeM9T5Qwgbn6THSyg3X76AvsNpCzfs h3daxok4575ZFrJHMbt4f1iiqmwTgPWAv3zLPBFskyJXSp36e+Du0f1k2/XpX/u3Y9fJz8 xStEeXuG8D03WETF1Od33HwXM+YjQGAYkC8vM4RU/HjJWJf/iaWN2zrv31ZgUYL5Vmqdp5 Z3xJ9IvWfIwh38/nrAz7YQGq68rPlMBoiq4MOUkQ1/9x1iRlehMIg2FI06+CuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709669646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0AGZXFmEG8p8WZdy0N3xqR0Ai1uq7jSEqkCj0NOu+Cc=; b=WKlqVX+b/021Wzxm+5BISbQCDFBGtuUnG7GwVJoLBnxr0+1v23129Imj7hlmNK0X5BYCN+ 3p+OYzdFWYJ4y/ncBhWQiE60zMYkIgqe4U86gx5+GK2Aux0dIFeVeqkbHtKd4UdLvSuCjV Loue4nmzT3Ock+GmjybegMf0fUpisODAK45ipRmJ1yr3W6dCXst5T39s2kdVXQod7hEbY4 oI/FxaHPmIW0LmiR80AXLrxsSUU+AKZJ+fnc4ExfP3AsVVrpMrnrl4hwIo+1iLXABHa6sR LBZrrlNTmovBrqzUKDMOCGO0hmmzyHj+QV3YAnSDFETusbzN7/ngzKz1yeyp/g== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tq6GQ2hnLzKjd for ; Tue, 5 Mar 2024 20:14:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 425KE6vc047034 for ; Tue, 5 Mar 2024 20:14:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 425KE693047028 for ports-bugs@FreeBSD.org; Tue, 5 Mar 2024 20:14:06 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 277513] security/p5-openxpki - service script resets file permissions and ownership breaking webui Date: Tue, 05 Mar 2024 20:14:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: byrnejb@harte-lyne.ca X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277513 Bug ID: 277513 Summary: security/p5-openxpki - service script resets file permissions and ownership breaking webui Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: byrnejb@harte-lyne.ca CC: svysh.fbsd@gmail.com Flags: maintainer-feedback?(svysh.fbsd@gmail.com) CC: svysh.fbsd@gmail.com FreeBSd-13.2p9 (jail) Name : p5-openxpki Version : 3.24.2 Using the service command to restart the openxpkid daemon results in permis= sion and ownership changes to files and directories that render the webui unusab= le: example: ``` for F in \ "/usr/local/etc/openxpki/webui/default.conf" \ "/usr/local/etc/openxpki/webui/" \ "/usr/local/etc/openxpki/" \ "/usr/local/etc/openxpki/config.d" \ "/usr/local/etc/openxpki/local/" \ "/var/log/openxpki/webui.log";=20 do=20 ls -ld $F;=20 done -rw-r--r-- 1 openxpki openxpki 4781 Feb 23 09:51 /usr/local/etc/openxpki/webui/default.conf drwxr-xr-x 2 openxpki openxpki 3 Feb 23 09:51 /usr/local/etc/openxpki/we= bui/ drwxr-xr-x 13 openxpki openxpki 21 Feb 23 12:37 /usr/local/etc/openxpki/ drwxr-x--- 5 openxpki openxpki 5 Feb 7 11:29 /usr/local/etc/openxpki/config.d drwxr-x--- 3 openxpki openxpki 3 Feb 7 11:50 /usr/local/etc/openxpki/lo= cal/ -rw-rw---- 1 www www 16601 Mar 5 13:00 /var/log/openxpki/webui.log openxpkictl restart Stopping OpenXPKI Stopping gracefully, 3 (sub)processes remaining... DONE. Starting OpenXPKI Community Edition v3.24.2 try/catch is experimental at /usr/local/lib/perl5/site_perl/OpenXPKI/Server/Init.pm line 103. try/catch is experimental at /usr/local/lib/perl5/site_perl/OpenXPKI/Server/Init.pm line 107. OpenXPKI Server is running and accepting requests. DONE. for F in \ "/usr/local/etc/openxpki/webui/default.conf" \ "/usr/local/etc/openxpki/webui/" \ "/usr/local/etc/openxpki/" \ "/usr/local/etc/openxpki/config.d" \ "/usr/local/etc/openxpki/local/" \ "/var/log/openxpki/webui.log";=20 do=20 ls -ld $F;=20 done -rw-r--r-- 1 openxpki openxpki 4781 Feb 23 09:51 /usr/local/etc/openxpki/webui/default.conf drwxr-xr-x 2 openxpki openxpki 3 Feb 23 09:51 /usr/local/etc/openxpki/we= bui/ drwxr-xr-x 13 openxpki openxpki 21 Feb 23 12:37 /usr/local/etc/openxpki/ drwxr-x--- 5 openxpki openxpki 5 Feb 7 11:29 /usr/local/etc/openxpki/config.d drwxr-x--- 3 openxpki openxpki 3 Feb 7 11:50 /usr/local/etc/openxpki/lo= cal/ -rw-rw---- 1 www www 16601 Mar 5 13:00 /var/log/openxpki/webui.log service openxpki onerestart Service dirs recreated... Executing: USER=3Dopenxpki /usr/local/bin/openxpkictl --config /usr/local/etc/openxpki/config.d restart Stopping OpenXPKI Stopping gracefully, 4 (sub)processes remaining... DONE. Starting OpenXPKI Community Edition v3.24.2 try/catch is experimental at /usr/local/lib/perl5/site_perl/OpenXPKI/Server/Init.pm line 103. try/catch is experimental at /usr/local/lib/perl5/site_perl/OpenXPKI/Server/Init.pm line 107. OpenXPKI Server is running and accepting requests. DONE. for F in \ "/usr/local/etc/openxpki/webui/default.conf" \ "/usr/local/etc/openxpki/webui/" \ "/usr/local/etc/openxpki/" \ "/usr/local/etc/openxpki/config.d" \ "/usr/local/etc/openxpki/local/" \ "/var/log/openxpki/webui.log";=20 do=20 ls -ld $F;=20 done -rwxr-xr-- 1 openxpki openxpki 4781 Feb 23 09:51 /usr/local/etc/openxpki/webui/default.conf drwxr-xr-- 2 openxpki openxpki 3 Feb 23 09:51 /usr/local/etc/openxpki/we= bui/ drwxr-xr-- 13 openxpki openxpki 21 Feb 23 12:37 /usr/local/etc/openxpki/ drwxr-xr-- 5 openxpki openxpki 5 Feb 7 11:29 /usr/local/etc/openxpki/config.d drwxr-xr-- 3 openxpki openxpki 3 Feb 7 11:50 /usr/local/etc/openxpki/lo= cal/ -rw-rw---- 1 openxpki openxpki 17010 Mar 5 14:57 /var/log/openxpki/webui.log ``` Using service instead of openxpkictl results in the permissions of director= ies losing the o+x capability and the owner of webui.log being changed to openxpki:openxpki from www:www. When the permissions are changed the webui fails to start and the error log= ged is: webui.fcgi: Can't open config file '/usr/local/etc/openxpki/webui/default.c= onf' (permission denied)=20 When the owner of webui.log is changed webui also fails to start and the er= ror logged is: webui.fcgi: Can't sysopen /var/log/openxpki/webui.log (Permission denied) --=20 You are receiving this mail because: You are the assignee for the bug.=