Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

unexpected error while deleting directories: Errno::EACCES #216

Closed
sigerello opened this Issue Jun 6, 2010 · 11 comments

Comments

Projects
None yet
8 participants

I use rails 3 branch.
I get next message in log file while I'm destroying record with attachment:
[paperclip] Deleting attachments.
[paperclip] deleting /Users/sigerello/Sites/rails_apps/nalovi/public/assets/products/categories_images/original/300-pic1.jpg
[paperclip] There was an unexpected error while deleting directories: Errno::EACCES
[paperclip] deleting /Users/sigerello/Sites/rails_apps/nalovi/public/assets/products/categories_images/thumb/300-pic1.jpg
[paperclip] There was an unexpected error while deleting directories: Errno::EACCES
[paperclip] deleting /Users/sigerello/Sites/rails_apps/nalovi/public/assets/products/categories_images/medium/300-pic1.jpg
[paperclip] There was an unexpected error while deleting directories: Errno::EACCES
Record destroys successfully and images too. It's just a message in log...
It seems like I got exception SystemCallError in flush_deletes method of Filesystem module.
I've checked directory permissions – it's 777.
So I don't understand what's wrong.

I am experiencing the same thing on rails 2.3.5 any ideas?

Jinci commented Aug 24, 2010

I have the same problem, too. I use rails 3.0.0.beta3

bserviss commented Sep 5, 2010

I'm seeing the same issue in Rails 3.0.0 in Ruby 1.9.2 and Windows Vista

have the same error rails 3.0.0 Ruby 1.9.2 on thin webserver. it totally hungs on this action

dongalor commented Oct 5, 2010

is there any solution? or maybe using ruby 1.8.7 is the best and fast way to solve it? )

user carrierwave, i found it good for me

bserviss commented Oct 5, 2010

I deleted the storage directories, went back to the defaults and it worked.

bserviss commented Oct 5, 2010

Arrow, there are a few probs with carrierwave - I'm having trouble getting it working with Diaspora

I had this same issue too and realized that the path in the model was incorrect.

bserviss commented Oct 7, 2010

Yes I still the error occasionally when paperclip tries to delete a non-existent file

Contributor

sikachu commented Jun 24, 2011

Are you sure that it's really not a permission issue? There's a code to check if your file exists since 2008, before trying to issue delete command:

https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/storage/filesystem.rb#L49-54

@queued_for_delete.each do |path|
  begin
    log("deleting #{path}")
    FileUtils.rm(path) if File.exist?(path)
  rescue Errno::ENOENT => e
    # ignore file-not-found, let everything else pass
  end
end

I don't know if we should handle the Errno::EACCES case, @jyurek what do you think?

@sikachu sikachu closed this in 41bc6b4 Jun 29, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment