Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
846 views
in Technique[技术] by (71.8m points)

ruby on rails - Permission denied in tmp

I just deployed a Rails 3 app with Ruby 1.9.2. I have been getting several errors.

  1. application.css wasn't compiled. so I set pre compilation in production.rb to false;
  2. Then I got: cannot generate tempfile, so I did rake tmp:clear;
  3. And now I get ActionView::Template::Error (Permission denied - /srv/www/appname/tmp/cache/assets): and I haven't been able to fix this one.

Please help.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If the user:group running your web server is http:http and it's running on *nix, do this:

sudo chown -R http:http /srv/www/appname/

Also, silly question, but does /tmp/cache/assets exist?

And, if so, as @leonel points out, you may also need to change the permissions:

chmod 777 /srv/www/appname/tmp/cache

Be careful setting 777 permissions on anything. Only do this to verify a permissions issue, then reset to the most minimal permissions necessary.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...