distro/rhel90: make nginx log and lib directories world writable

Previously, we only needed the log directory to be writeable.
In newer versions of nginx, it also needs to create directories in
/var/lib/nginx, so we make that directory writeable and traversable as
well.
This commit is contained in:
Achilleas Koutsou 2021-11-09 13:43:33 +01:00 committed by Ondřej Budai
parent a8eb58bc62
commit 82cf71c5a1

View file

@ -1017,9 +1017,10 @@ func containerTreePipeline(repos []rpmmd.RepoConfig, packages []rpmmd.PackageSpe
ostreePullStageInputs("org.osbuild.pipeline", "name:ostree-commit", options.OSTree.Ref),
))
// make nginx log directory world writeable, otherwise nginx can't start in
// make nginx log and lib directories world writeable, otherwise nginx can't start in
// an unprivileged container
p.AddStage(osbuild.NewChmodStage(chmodStageOptions("/var/log/nginx", "o+w", true)))
p.AddStage(osbuild.NewChmodStage(chmodStageOptions("/var/log/nginx", "a+rwX", true)))
p.AddStage(osbuild.NewChmodStage(chmodStageOptions("/var/lib/nginx", "a+rwX", true)))
p.AddStage(osbuild.NewNginxConfigStage(nginxConfigStageOptions(nginxConfigPath, htmlRoot, listenPort)))
return p