Skip to content

Commit 0f4e9ef

Browse files
authored
Merge pull request #482 from Lex-2008/ENT-4250-httpd-api-perms
ENT-4250 Let cf-apache access to Mission Portal api
2 parents 6fa669d + da758fc commit 0f4e9ef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packaging/common/cfengine-hub/postinstall.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,11 @@ find $PREFIX/httpd/htdocs/logs/ -type f -exec chmod 0640 {} +
771771
find $PREFIX/httpd/htdocs/application/ -type f -exec chown -R root:$MP_APACHE_USER {} +
772772
find $PREFIX/httpd/htdocs/application/ -type f -exec chmod 0440 {} +
773773

774+
# API dirs ENT-4250
775+
# Note that this will include the 'api' dir itself
776+
find $PREFIX/httpd/htdocs/api/ -type d ! -name 'static' -exec chown root:$MP_APACHE_USER {} +
777+
find $PREFIX/httpd/htdocs/api/ -type d ! -name 'static' -exec chmod 0550 {} +
778+
774779
# API non-executable
775780
find $PREFIX/httpd/htdocs/api/ -type f ! -name '*.sh' -exec chown -R root:$MP_APACHE_USER {} +
776781
find $PREFIX/httpd/htdocs/api/ -type f ! -name '*.sh' -exec chmod 0440 {} +
@@ -782,6 +787,7 @@ find $PREFIX/httpd/htdocs/api/ -type f -name '*.sh' -exec chmod 0550 {} +
782787
# API static non htaccess
783788
find $PREFIX/httpd/htdocs/api/static -type f ! -name '.htaccess' -exec chown -R root:$MP_APACHE_USER {} +
784789
find $PREFIX/httpd/htdocs/api/static -type f ! -name '.htaccess' -exec chmod 0440 {} +
790+
785791
chown root:$MP_APACHE_USER $PREFIX/httpd/htdocs/api/static
786792
chmod 0660 $PREFIX/httpd/htdocs/api/static
787793

0 commit comments

Comments
 (0)