Skip to content

Commit

Permalink
Permissions update
Browse files Browse the repository at this point in the history
Set permissions + setfacl on `./plugins`, `./storage`, `./themes`

Fixes Issue #6
  • Loading branch information
petehalverson committed Dec 7, 2017
1 parent d34e905 commit f640d17
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 12 deletions.
6 changes: 4 additions & 2 deletions Dockerfile.edge.template
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
# permissions
chown -R www-data:www-data /var/www/html
# permissions + setfacl
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

# Initialize crontab for the October CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
# permissions
chown -R www-data:www-data /var/www/html
# permissions + setfacl
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

# Initialize crontab for the October CMS scheduler
RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
Expand Down
4 changes: 3 additions & 1 deletion php7.0/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
crontab /etc/cron.d/october-cron
Expand Down
4 changes: 3 additions & 1 deletion php7.0/apache/Dockerfile.edge
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
crontab /etc/cron.d/october-cron
Expand Down
4 changes: 3 additions & 1 deletion php7.0/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
crontab /etc/cron.d/october-cron
Expand Down
4 changes: 3 additions & 1 deletion php7.0/fpm/Dockerfile.edge
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
crontab /etc/cron.d/october-cron
Expand Down
4 changes: 3 additions & 1 deletion php7.1/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
crontab /etc/cron.d/october-cron
Expand Down
4 changes: 3 additions & 1 deletion php7.1/apache/Dockerfile.edge
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
crontab /etc/cron.d/october-cron
Expand Down
4 changes: 3 additions & 1 deletion php7.1/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
crontab /etc/cron.d/october-cron
Expand Down
4 changes: 3 additions & 1 deletion php7.1/fpm/Dockerfile.edge
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ RUN curl -o octobercms.tar.gz -fSL https://codeload.github.com/octobercms/octobe
\$app->make('Illuminate\\Contracts\\Console\\Kernel')->bootstrap(); \
Parameter::set(['system::core.build'=>getenv('OCTOBERCMS_CORE_BUILD'), 'system::core.hash'=>getenv('OCTOBERCMS_CORE_HASH')]); \
echo \"October CMS \\n Build: \",Parameter::get('system::core.build'), \"\\n Hash: \", Parameter::get('system::core.hash'), \"\\n\";" && \
chown -R www-data:www-data /var/www/html
chown -R www-data:www-data /var/www/html && \
setfacl -R -d -m u::rwx,g::rwx,o::rx plugins storage themes && \
find . -type d \( -path './plugins' -or -path './storage' -or -path './themes' \) -exec chmod g+ws {} \;

RUN echo "* * * * * /usr/local/bin/php /var/www/html/artisan schedule:run > /proc/1/fd/1 2>/proc/1/fd/2" > /etc/cron.d/october-cron && \
crontab /etc/cron.d/october-cron
Expand Down

0 comments on commit f640d17

Please sign in to comment.