File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 35
35
done
36
36
37
37
%post core
38
- # These files are not owned by the rpm.
39
- # For upgrades, ensure they have the correct group privs
38
+ # These directories contain files not owned by this rpm.
39
+ # For upgrades, ensure the files have the correct group privs
40
40
# so root and manageiq users can read them.
41
- %{__chown} -f manageiq.manageiq %{app_root}/certs/v2_key %{app_root}/log/*.log
42
- %{__chown} -f manageiq.manageiq %{app_root}/tmp/pids/*.pid %{app_root}/config/*.yml
41
+ [ -e %{app_root}/certs/v2_key ] && %{__chown} manageiq.manageiq %{app_root}/certs/v2_key
42
+ [ -e %{app_root}/certs/v2_key ] && %{__chmod} o-rw %{app_root}/certs/v2_key
43
+
44
+ %{__chown} -R manageiq.manageiq %{app_root}/log
45
+ %{__chmod} -R o-rw %{app_root}/log
46
+
47
+ %{__chown} -R manageiq.manageiq %{app_root}/tmp/pids
48
+ %{__chmod} -R o-rw %{app_root}/tmp/pids
49
+
43
50
%{__chown} -R manageiq.manageiq %{app_root}/data
44
- %{__chmod} -f o-rw %{app_root}/certs/v2_key
45
- %{__chmod} -f o-rw %{app_root}/config/*.yml %{app_root}/tmp/pids/*.pid
46
- %{__chmod} -f o-rw %{app_root}/log/*.log
47
51
48
52
%files core
49
53
%defattr(-,root,root,-)
You can’t perform that action at this time.
0 commit comments