-
Notifications
You must be signed in to change notification settings - Fork 42
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
Not preserving permissions. #7
Comments
So they blow away permissions that were set in source files? Will check it out. Thanks. |
+1 for different permissions after optimization. |
It seems to affect some images, jpeg in particular but not png... |
Ditto - png's. |
Same here. @roundedbygravity, I saw another issue from you here on github that made use of the after_build that changed permissions, I've been using that with good success but not here with middleman-imageoptim gem, are you experience the same? class FixPermissions < Middleman::Extension
def initialize(app, options_hash={}, &block)
super
app.after_build do |builder|
builder.run 'chmod 755 build/assets/fonts/*'
builder.run 'chmod 644 build/assets/images/*'
builder.run 'chmod 755 build/assets/javascripts/*'
builder.run 'chmod 755 build/assets/stylesheets/*'
end
end
end
::Middleman::Extensions.register(:fix_perm, FixPermissions) |
I'm having the same issue with .jpg files. |
I also have this problem with .jpg files. It changes the permissions from 644 to 600 |
I'm seeing the same issue on both PNGs and JPGs, although strangely I'll get random PNGs where the permissions remain unaffected (644). |
Has anyone had any luck killing the permissions issue? |
The issue with the file permissions is with tjko/jpegoptim: This got fixed in v1.3.1 of jpegoptim. My Ubuntu 12.04 had version v1.2.5 I then tried to follow the instructions in https://github.com/toy/image_optim to build jpegoptim:
which resulted in:
I then ran:
When I then ran the configure script it then configured OK but the make was unhappy:
I'm not really sure what it's trying to do with a non-existent file
Now when I run my middleman build task my permissions don't get screwed up and I don't need any additional tasks to fix permissions etc. @plasticine This is not an issue with your extension :) |
@richhollis ah, you are awesome. Yeah I've suspected this for ages but had no idea how to actually narrow it down. Thanks so much for doing the legwork. |
I still have permission issues with jpegoptim v1.3.1 installed, can anyone else confirm? |
Getting .jpg file permissions changed from 644 to 600 in jpegoptim v 1.4.1 |
@saragibby I think this project has been abandoned. The permissions issue has been a problem for almost a year now. I think someone also forked the original imageoptim because there's no activity but no ones moved it over to middleman. If I'm wrong and you know of a solution or find one I'd be happy to hear about it! |
For some reason, when I run this, the compressed images don't preserve permissions. I have to chmod 644 them to get them to show on web server properly.
The text was updated successfully, but these errors were encountered: