question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Big files are uploaded with broken permissions

See original GitHub issue

Issue Summary

Files bigger than 2.48 MB are uploaded with wrong permissions and are not readable from /media/

Steps to Reproduce

Create two files with content size 2600000 bytes and 2700000 bytes. The second file gets its access rights mangled. Reproducible for me on two separate installations.

wagtail 1.12.2, Django==1.11, python 3.5.2+ (ubuntu 16.10)

and

1.13. with python 3.5.3 (ubuntu 17.04):

django-analytical==2.3.0
django-compressor==2.2
django-redis==4.8.0
django-sekizai==0.10.0
libsass==0.13.3
psycopg2==2.7.3.1
wagtail==1.13.1
waitress==1.1.0
requests==2.18.4

This is how the files get saved in media

with the smaller ones working as expected: screen shot 2017-11-23 at 11 57 46

Any ideas on how to resolve this issues or where to start digging?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
BertrandBordagecommented, Nov 23, 2017

Did you try setting FILE_UPLOAD_PERMISSIONS?

0reactions
gasmancommented, Nov 24, 2017

I agree. If FILE_UPLOAD_PERMISSIONS doesn’t help and testing with a FileField shows that this is Wagtail-specific, let us know and we’ll reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve issues with uploading large files in Amazon S3
I'm trying to upload a large file using the Amazon S3 console. ... The IAM user or role must have the correct permissions...
Read more >
Fix problems uploading files on the OneDrive website
Sign in to OneDrive with your Microsoft account, and then try to upload the file again. You don't have permission to access the...
Read more >
How to Fix File and Folder Permissions Error in WordPress
Incorrect file and folder permissions can cause errors on your WordPress site during upload. In this article, we will show you how to...
Read more >
Unrestricted File Upload
File uploaders should be only accessible to authenticated and authorised users if possible. Write permission should be removed from files and folders other ......
Read more >
How to Fix Server Upload Permissions
This permission error normally occurs when a file on the server is not world-readable. By default, when new files are uploaded, they are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found