FS#42318 - [squid] proxy user got not created during installation
Attached to Project:
Community Packages
Opened by Reik Keutterling (Spielkind) - Thursday, 09 October 2014, 19:13 GMT
Last edited by Evangelos Foutras (foutrelis) - Wednesday, 22 October 2014, 00:08 GMT
Opened by Reik Keutterling (Spielkind) - Thursday, 09 October 2014, 19:13 GMT
Last edited by Evangelos Foutras (foutrelis) - Wednesday, 22 October 2014, 00:08 GMT
|
Details
Description:
proxy user is missing after installation of squid Steps to reproduce: #> pacman -S squid resolving dependencies... looking for inter-conflicts... Packages (1): squid-3.4.8-1 Total Installed Size: 8.25 MiB :: Proceed with installation? [Y/n] (1/1) checking keys in keyring [##############################################################] 100% (1/1) checking package integrity [##############################################################] 100% (1/1) loading package files [##############################################################] 100% (1/1) checking for file conflicts [##############################################################] 100% (1/1) checking available disk space [##############################################################] 100% (1/1) installing squid [##############################################################] 100% error: command failed to execute correctly #> id proxy id: proxy: no such user #> systemctl start squid.service Job for squid.service failed. See 'systemctl status squid.service' and 'journalctl -xn' for details. #> systemctl status squid.service ● squid.service - Web Proxy Cache Server Loaded: loaded (/usr/lib/systemd/system/squid.service; disabled) Active: failed (Result: exit-code) since Thu 2014-10-09 21:11:41 CEST; 4s ago Process: 10960 ExecStart=/usr/bin/squid -sYC (code=exited, status=1/FAILURE) Oct 09 21:11:41 xx systemd[1]: Starting Web Proxy Cache Server... Oct 09 21:11:41 xx squid[10960]: getpwnam failed to find userid for effective user 'proxy' Oct 09 21:11:41 xx squid[10960]: FATAL: getpwnam failed to find userid for effective user 'proxy' Oct 09 21:11:41 xx squid[10960]: Squid Cache (Version 3.4.8): Terminated abnormally. Oct 09 21:11:41 xx squid[10960]: CPU Usage: 0.009 seconds = 0.007 user + 0.002 sys Oct 09 21:11:41 xx squid[10960]: Maximum Resident Size: 37232 KB Oct 09 21:11:41 xx squid[10960]: Page faults with physical i/o: 0 Oct 09 21:11:41 xx systemd[1]: squid.service: control process exited, code=exited status=1 Oct 09 21:11:41 xx systemd[1]: Failed to start Web Proxy Cache Server. Oct 09 21:11:41 x systemd[1]: Unit squid.service entered failed state. |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Wednesday, 22 October 2014, 00:08 GMT
Reason for closing: Fixed
Additional comments about closing: squid 3.4.8-2
Wednesday, 22 October 2014, 00:08 GMT
Reason for closing: Fixed
Additional comments about closing: squid 3.4.8-2
change /usr/lib/sysusers.d/squid.conf from
u proxy 15 "" /var/empty
to
u proxy 15 - /var/empty
execute systemd-sysusers squid.conf
After the change and
# systemd-sysusers squid.conf
as root, of course, the user proxy was created.
# id proxy
uid=15(proxy) gid=15(proxy) groups=15(proxy)
Didn't try a reinstall, though...
The above package creates the proxy user/group during upgrade if it doesn't exist; new installations behave correctly as well.
IMO it's fine as-is; it has always been this way in the past too.
Doing this unconditionally, has also the drawback of reseting user/group to a value which could be changed by the user to give different access to these files. Pacman doesn't overwrite ownership/rights change in that purpose.
Ya, no big deal, that worked in the past, but it's cleaner to put ownership in pacman and only create users when package is setup. post_upgrade should only handle my broken past packages.
While we are around this package, better is to improve it as much as possible.