diff --git a/Dockerfile b/Dockerfile index 54eb48b..781c67e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,10 +47,10 @@ RUN cd /var/www/passbolt \ && composer global require hirak/prestissimo \ && composer install \ && chown -R www-data:www-data /var/www/passbolt \ - && chmod 775 $(find /var/www/passbolt/tmp -type f) \ - && chmod 664 $(find /var/www/passbolt/tmp -type d) \ - && chmod 775 $(find /var/www/passbolt/webroot/img/public -type f) \ - && chmod 664 $(find /var/www/passbolt/webroot/img/public -type d) + && chmod 775 $(find /var/www/passbolt/tmp -type d) \ + && chmod 664 $(find /var/www/passbolt/tmp -type f) \ + && chmod 775 $(find /var/www/passbolt/webroot/img/public -type d) \ + && chmod 664 $(find /var/www/passbolt/webroot/img/public -type f) COPY conf/passbolt.conf /etc/nginx/conf.d/default.conf COPY conf/supervisord.conf /etc/supervisord.conf diff --git a/spec/docker_image/image_spec.rb b/spec/docker_image/image_spec.rb index 97b4fd9..ef89ec5 100644 --- a/spec/docker_image/image_spec.rb +++ b/spec/docker_image/image_spec.rb @@ -61,6 +61,14 @@ describe 'Dockerfile' do expect(file(passbolt_tmp)).to be_owned_by(passbolt_owner) expect(file(passbolt_image)).to be_owned_by(passbolt_owner) end + + it 'must have the correct permissions on tmp' do + expect(file(passbolt_tmp)).to be_mode('775') + end + + it 'must have the correct permissions on img' do + expect(file(passbolt_image)).to be_mode('775') + end end describe 'nginx configuration' do