Giter VIP home page Giter VIP logo

Comments (5)

xi avatar xi commented on July 27, 2024

Works for me locally.

from a4-product.

kleingeist avatar kleingeist commented on July 27, 2024

the images are stored with the access permissions -rw------- (600) and are thus not readable by the user the nginx server is running.
@2e2a you reported this behavior before. did you find out why the permissions were set that way? and how did you resolve the problem on meinBerlin liqd/a4-meinberlin#581

i tried to reproduce, but the image i did upload now is stored with the correct permissions -rw-r--r-- (644) :(

from a4-product.

2e2a avatar 2e2a commented on July 27, 2024

No, I could not reproduce it and it did not occur again.

from a4-product.

kleingeist avatar kleingeist commented on July 27, 2024

i fixed the uploaded images permission for now manually by running
find /home/django/django/media/uploads -type f -exec chmod 644 {} \+
from within the container. but this issue is really weird.

from a4-product.

kleingeist avatar kleingeist commented on July 27, 2024

the problem resulted from the django file storages behaviour in regard to temporary files.
if a file of a size less then 2.5mb was uploaded it is stored first in memory and finally, after validation, stored to the disk
for files greater then 2.5mb a concrete temporary file with the 600 perms is created for the uploaded data. this file is later renamed to the desired filename, but the perms are not adapted.
to explicitly set the perms to 644 the https://docs.djangoproject.com/en/2.0/ref/settings/#std:setting-FILE_UPLOAD_PERMISSIONS setting has to be set.
this issue is closed as the deployment has been extended set FILE_UPLOAD_PERMISSIONS = 0o644

from a4-product.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.