Skip to content

Create /var/log/simplerisk/simplerisk.log with correct apache ownership#37

Open
DASimp wants to merge 1 commit into
mainfrom
add-simplerisk-log-setup
Open

Create /var/log/simplerisk/simplerisk.log with correct apache ownership#37
DASimp wants to merge 1 commit into
mainfrom
add-simplerisk-log-setup

Conversation

@DASimp
Copy link
Copy Markdown
Contributor

@DASimp DASimp commented May 22, 2026

Summary

  • Adds a new set_up_simplerisk_log helper that creates /var/log/simplerisk/ and simplerisk.log, then sets ownership and permissions using the OS-appropriate apache user
  • Calls the helper from each OS setup function with the correct user: www-data (Debian/Ubuntu), apache (RHEL/CentOS), wwwrun (SUSE)
  • Applies httpd_log_t SELinux context to /var/log/simplerisk on RHEL/CentOS installs
  • All three uninstall functions now also remove /var/log/simplerisk during cleanup

Permissions set

Path Mode
/var/log/simplerisk/ 750 (apache user owns, root group)
/var/log/simplerisk/simplerisk.log 640

Test plan

  • Run setup on Ubuntu 22.04/24.x — verify /var/log/simplerisk/simplerisk.log exists, owned by www-data
  • Run setup on RHEL/CentOS 9/10 — verify owned by apache, SELinux context is httpd_log_t
  • Run setup on SLES 15.7 — verify owned by wwwrun
  • Run --uninstall on each OS — verify /var/log/simplerisk is removed

🤖 Generated with Claude Code

…ip per OS

Adds set_up_simplerisk_log helper that creates /var/log/simplerisk/ and
simplerisk.log, then chowns them to the OS-appropriate apache user
(www-data on Debian/Ubuntu, apache on RHEL/CentOS, wwwrun on SUSE).
RHEL installs also apply the httpd_log_t SELinux context to the directory.
All three uninstall functions remove /var/log/simplerisk on cleanup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant