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.

File permissions issue when upgrading from 1.5.4 to 1.6.4

See original GitHub issue

After upgrading to 1.6.4 and following the upgrade changes listed here, I see that files that are compiled, such as less files, don’t take on permissions like they once did.

I’m serving statics from a separate user (ubuntu user in the ubuntu group) and the lastest django-pipeline changes causes the front end to throw a 403 since the static’s user can no longer see the files that have been complied (lacking correct group permissions).

Look at the file permissions for the compiled file before and after the upgrade:

django-pipeline 1.5.4

Everything works as expected.

-rw-r--r--  1 troy    ubuntu  2658 Jan  5 10:48 activities.css
-rw-rw-r--  1 ubuntu  ubuntu  3234 Jan  5 10:16 activities.less

django-pipeline 1.6.4

Get 403’s on the front end because the group no longer has read permissions to activities.css.

-rw-------  1 troy    ubuntu  2658 Jan  5 10:31 activities.css
-rw-rw-r--  1 ubuntu  ubuntu  3234 Jan  5 10:16 activities.less

This is using python 3.4.3, django 1.8.7.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
StoicLoofahcommented, Mar 23, 2016

I did some poking around, and I believe the problem was introduced in 1.6.1 in this block https://github.com/jazzband/django-pipeline/blob/1.6.1/pipeline/compilers/__init__.py#L122-L145 in commit 1f6b48ae74026a12f955f2f15f9f08823d744515

For me, the collectstatic call appears to work correctly: this comes up when {% stylesheet MYFILE %} is actually invoked as a templatetag: the stylesheet is recompiled.

The issue appears to be that the temporary file is assigned the mask 600, and when it is renamed, it doesn’t update it to the same permission as before. In my situation, this is problematic because my static files are being served over apache.

I don’t really understand the mechanics of why the process is designed the way that it is, but perhaps someone else who does understand can chime in?

0reactions
siovenecommented, Mar 15, 2018

Please note, this only happens with the Less compiler. Converted my files to sass and the issue is not reproduced.

Read more comments on GitHub >

github_iconTop Results From Across the Web

1.5.4 upgrade to 1.6+ : site broken ("Invalid query
Hi, my CMSMS installation was working great on the old server , we had been using version 1.3.1 for more than a year....
Read more >
Apache Spark upgrade from 1.5.2 to 1.6.0 using homebrew ...
I ran into the same issue and the easiest fix is to set $SPARK_HOME to ... This will change the permission of the...
Read more >
Upgrading Apigee hybrid - Google Cloud
Step 1: Upgrade Kubernetes and download the release package · Step 2: Reconfigure your installation directory · Step 3: Update your overrides file...
Read more >
8.6.1 Conference and Issue Resolution - IRS
Prior to requesting a Master File update, ensure the change is being ... or the express permission of a court of competent jurisdiction, ......
Read more >
Bug listing with status RESOLVED with resolution FIXED as at ...
Bug :2 - "How do I attach an ebuild. ... Bug:187 - "new sudo-1.6.4 ebuild fails at . ... Bug:1817 - "Incorrect file/directory...
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