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

Use symbolic links in place of copying the whole files #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hartator
Copy link

Avoid copying the asset files using symbolic links. Should save both time when deploying and disk space on production severs. Shouldn't impact Nginx or Apache performance.

@iRet
Copy link

iRet commented Jan 29, 2016

A good idea!

@chewi
Copy link

chewi commented Mar 8, 2016

Apart from being a good idea, this also fixes a weird permissions issue I've seen. I deploy into an environment where we're not supposed to go in as a shared user so group writeable permissions are enforced. This works except for the line being discussed here. Only root or the owner of the file are allowed to modify the atime/mtime to anything other than the current time. If the file was initially created by someone else, it blows up with Operation not permitted. It doesn't matter than you're still allowed to modify or even delete the file itself. See man utime for the formal explanation. Deleting the file first is one workaround and ln -sf effectively achieves this. I have rebased the above commit against current master and it works fine.

andresf added a commit to wepow/non-stupid-digest-assets that referenced this pull request Sep 2, 2016
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

Successfully merging this pull request may close these issues.

3 participants