I’m working on Rails app with Paperclip gem used to save users’ avatars. Production environment, FreeBSD, Apache, MySQL.
When saving user profile with an avatar file specified – the Permission denied errors appears.
I set 777 permission to all Paperclip directories – it didn’t help.
Please help!
Thanks!
config/environments/production.rb
Paperclip.options[:command_path] = '/usr/local/bin'
app/models/user.rb
has_attached_file :avatar, :styles => { :medium => "300x180>", :thumb => "40x40>" }
The answer is quite simple (as always). Change the owner of the public directory to www (was root):
$ chown -R www public