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

Compile permission error #710

Open
Pyvonix opened this issue Jan 12, 2020 · 3 comments
Open

Compile permission error #710

Pyvonix opened this issue Jan 12, 2020 · 3 comments

Comments

@Pyvonix
Copy link

Pyvonix commented Jan 12, 2020

I find a very specific problem related to permissions due to the MR #694

Error:

Error compiling CSS package "bootstrap"

Command:
/usr/bin/sass /home/user/my-project/static/bootstrap.scss /var/www/my-project.com/static/bootstrap.css

Errors:
[Errno 13] Permission denied: '/home/user/my-project/static/tmp75g2esr9'

Related code (pipeline/compilers/__init__.py ):

project_infile = finders.find(input_path)
outfile = compiler.output_path(infile, compiler.output_extension)
outdated = compiler.is_outdated(project_infile, outfile)
compiler.compile_file(project_infile, outfile,

Investigation:
If I run the project as www-data (uwsgi context) and not as user, who owner of the repertory /home/user/my-project/. When permissions 644 are recursivly apply on my user repertory, pipeline (as www-data) try to create a "temporary file" (tmp75g2esr9) and that is not allowed.

Solution:
May be we can generate the temporary file (project_infile) in /tmp? which would be more adequate?

@Pyvonix Pyvonix changed the title Developpement permission error Compile permission error Jan 12, 2020
@D-Pavlov
Copy link

Hi, I have this exact problem. Is there any solution to this?

@Pyvonix
Copy link
Author

Pyvonix commented May 26, 2020

Hi @D-Pavlov,

My monkey solution (for the moment) was to manually rollback to have the old behavior how doesn't generate temporaries files. I will work on a more general fix soon.

@D-Pavlov
Copy link

Hi @TheBuky,
Thank you for the quick reply!
Turns out I don't get the error if I use 'pipeline.storage.PipelineStorage' instead of 'pipeline.storage.PipelineCachedStorage', so I'll roll with that for the time being.
Maybe this information can be useful to you, maybe not 😄
Anyway, thanks again, cheers!

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

2 participants