Fix nginx parent directory permissions
- chmod 755 on /var/lib/nginx to allow www-data to traverse - Parent directory was 750 (drwxr-x---) owned by nginx:nginx - www-data couldn't access tmp subdirectory despite owning it - This fixes the Permission denied error on PDF uploads
This commit is contained in:
parent
a81f26ce88
commit
80b5adf3f4
1 changed files with 4 additions and 3 deletions
|
|
@ -62,9 +62,10 @@ RUN mkdir -p /var/lib/nginx/tmp/client_body \
|
||||||
/var/lib/nginx/tmp/uwsgi \
|
/var/lib/nginx/tmp/uwsgi \
|
||||||
/var/lib/nginx/tmp/scgi
|
/var/lib/nginx/tmp/scgi
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions - fix parent directory first, then subdirectories
|
||||||
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache /var/lib/nginx/tmp
|
RUN chmod 755 /var/lib/nginx && \
|
||||||
RUN chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache /var/lib/nginx/tmp
|
chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache /var/lib/nginx/tmp && \
|
||||||
|
chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache /var/lib/nginx/tmp
|
||||||
|
|
||||||
# Copy nginx configuration
|
# Copy nginx configuration
|
||||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue