Search code examples
ruby-on-railsmongodbpassengerresque

standalone passenger throws access denied for /tmp/passenger.1.0.747/generation-0/backends/ruby


migrated a rails server running on a single machine to a multi-machine config( 2 passengers behind VPC Loadbalancer,1 mongo/redis). but the standalone passenger is throwing the following error. any suggested solutions for this

[ pid=844 thr=11555480 file=utils.rb:176 time=2012-08-15 13:19:50.538 ]: *** Exception     Errno::EACCES in application (Permission denied - /tmp/passenger.1.0.747/generation-    0/backends/ruby.CmC4pRejK75qNudAHhowIO0Z80iJELkiZcQMxRtxnZCOsxXeVv9Jx0xwt) (process 844,     thread #<Thread:0x0000000160a530>):
from /var/lib/passenger-standalone/3.0.13-x86_64-ruby1.9.2-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:392:in `initialize'
from /var/lib/passenger-standalone/3.0.13-x86_64-ruby1.9.2-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:392:in `new'
from /var/lib/passenger-standalone/3.0.13-x86_64-ruby1.9.2-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:392:in `create_unix_socket_on_filesystem'
from /var/lib/passenger-standalone/3.0.13-x86_64-ruby1.9.2-linux-gcc4.6.3-1002/support/lib/phusion_passenger/abstract_request_handler.rb:174:in `initialize'
from /var/lib/passenger-standalone/3.0.13-x86_64-ruby1.9.2-linux-gcc4.6.3-1002/support/lib/phusion_passenger/rack/request_handler.rb:61:in `initialize'

upon digging, my production.rb is owned by non-root 'ubuntu' who does not have write access to /tmp/passenger.1.0.747/generation-0/backends/ruby .

progressed, but still clueless how to fix it.

Workaround: So the problem was, capistrano deploy + passenger deploy as a non-root causes all these folder permission issues. had to revert to root deployment to workaround it


Solution

  • Issue was a non-root deploy via capistrano + standalone passenger. workaround: used a root deployment via capistrano, which solved the folder issue.