rpm pkg - change ownership of php session files
This commit is contained in:
parent
05c4f586c2
commit
5e2935b81d
|
@ -128,7 +128,7 @@ Requires: zip
|
||||||
%{systemd_requires}
|
%{systemd_requires}
|
||||||
|
|
||||||
Requires(post): %{_bindir}/gpasswd
|
Requires(post): %{_bindir}/gpasswd
|
||||||
Requires(post): %{_bindir}/less
|
Requires(post): %{_bindir}/chown
|
||||||
|
|
||||||
%description common
|
%description common
|
||||||
ZoneMinder is a set of applications which is intended to provide a complete
|
ZoneMinder is a set of applications which is intended to provide a complete
|
||||||
|
@ -250,6 +250,9 @@ echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, you must read the README
|
||||||
echo -e "\nThe README file is located here: %{_pkgdocdir}-common/README\n"
|
echo -e "\nThe README file is located here: %{_pkgdocdir}-common/README\n"
|
||||||
|
|
||||||
%post httpd
|
%post httpd
|
||||||
|
# For the case of changing from nginx <-> httpd, existing php session files must change ownership
|
||||||
|
%{_bindir}/chown -R %{zmuid_final}:%{zmgid_final} %{_sharedstatedir}/php/session/ >/dev/null 2>&1 || :
|
||||||
|
|
||||||
ln -sf %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.httpd %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
ln -sf %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.httpd %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||||
# backwards compatibility
|
# backwards compatibility
|
||||||
ln -sf %{_sysconfdir}/zm/www/zoneminder.httpd.conf %{_sysconfdir}/zm/www/zoneminder.conf
|
ln -sf %{_sysconfdir}/zm/www/zoneminder.httpd.conf %{_sysconfdir}/zm/www/zoneminder.conf
|
||||||
|
@ -264,6 +267,9 @@ ln -sf %{_sysconfdir}/zm/www/zoneminder.httpd.conf %{_sysconfdir}/zm/www/zonemin
|
||||||
# We could override the folder permission, but adding nginx to the apache group works better
|
# We could override the folder permission, but adding nginx to the apache group works better
|
||||||
%{_bindir}/gpasswd -a nginx apache >/dev/null 2>&1 || :
|
%{_bindir}/gpasswd -a nginx apache >/dev/null 2>&1 || :
|
||||||
|
|
||||||
|
# For the case of changing from httpd <-> nginx, existing php session files must change ownership
|
||||||
|
%{_bindir}/chown -R nginx:nginx %{_sharedstatedir}/php/session/ >/dev/null 2>&1 || :
|
||||||
|
|
||||||
ln -sf %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.nginx %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
ln -sf %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.nginx %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||||
# backwards compatibility
|
# backwards compatibility
|
||||||
ln -sf %{_sysconfdir}/zm/www/zoneminder.nginx.conf %{_sysconfdir}/zm/www/zoneminder.conf
|
ln -sf %{_sysconfdir}/zm/www/zoneminder.nginx.conf %{_sysconfdir}/zm/www/zoneminder.conf
|
||||||
|
|
Loading…
Reference in New Issue