Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission Issue (/var/www/html/upload/surveys) #201

Open
Klesel opened this issue Jan 16, 2025 · 0 comments
Open

Permission Issue (/var/www/html/upload/surveys) #201

Klesel opened this issue Jan 16, 2025 · 0 comments

Comments

@Klesel
Copy link

Klesel commented Jan 16, 2025

Using the current version of docker-compose, it is not possible to upload image to customize a survey.

Permission denied: /var/www/html/upload/surveys/NUMBER/images

This is what I tried first:

I change the Dockerfile. I added the path at the end:

# Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository)
RUN set -ex; \
        curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \
        echo "${sha256_checksum}  /tmp/limesurvey.tar.gz" | sha256sum -c - && \
        \
        tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
        rm -f "/tmp/limesurvey.tar.gz" && \
        chown -R "$USER:$USER" /var/www/html /etc/apache2 /var/www/html/upload/surveys

This did not work. The folder was still assigned to root.

I tryed to change the permission as root before the user changes to $USER

WORKDIR /var/www/html
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY vhosts-access-log.conf /etc/apache2/conf-enabled/other-vhosts-access-log.conf
USER root
RUN chown -R www-data:www-data /var/www/html/upload/surveys
USER $USER
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["apache2-foreground"]

This solution worked.

Can you please double check and add it to the Dockerfile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant