instructure/canvas-lms — Issue #119: Canvas startup Issue - Permission denied 
Author: bhatias
Created: 2011-10-31 22:38:41+00:00
State: open

I am trying a production install of canvas. After I start the process and point my browser to it, thsi is what I see -
* Phusion Passenger

Ruby (Rack) application could not be started
These are the possible causes:

*
There may be a syntax error in the application's code. Please check for such errors and fix them.
*
A required library may not installed. Please install all libraries that this application requires.
*
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
*
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.

Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.

Error message:
Permission denied - /var/rails/canvas/config/cache_store.yml
Exception class:
Errno::EACCES
Application root:
/var/rails/canvas
Backtrace:
#	File	Line	Location
0	/usr/lib/ruby/1.8/yaml.rb	143	in `initialize'
1	/usr/lib/ruby/1.8/yaml.rb	143	in `open'
2	/usr/lib/ruby/1.8/yaml.rb	143	in `load_file'
3	/var/rails/canvas/app/models/setting.rb	84	in `from_config'
4	/var/rails/canvas/lib/canvas.rb	57	in `cache_store_config'
5	/var/rails/canvas/config/environments/development.rb	34	in `load_environment'
6	/home/sysadmin/gems/gems/rails-2.3.14/lib/initializer.rb	386	in `load_environment'
7	/home/sysadmin/gems/gems/activesupport-2.3.14/lib/active_support/core_ext/kernel/reporting.rb	11	in `silence_warnings'
8	/home/sysadmin/gems/gems/rails-2.3.14/lib/initializer.rb	379	in `load_environment'
9	/home/sysadmin/gems/gems/rails-2.3.14/lib/initializer.rb	137	in `process'
10	/home/sysadmin/gems/gems/rails-2.3.14/lib/initializer.rb	113	in `send'
11	/home/sysadmin/gems/gems/rails-2.3.14/lib/initializer.rb	113	in `run'
12	./config/environment.rb	9
13	/usr/lib/ruby/1.8/rubygems/custom_require.rb	31	in `gem_original_require'
14	/usr/lib/ruby/1.8/rubygems/custom_require.rb	31	in `require'
15	config.ru	1
16	/usr/lib/ruby/1.8/rack/builder.rb	46	in `instance_eval'
17	/usr/lib/ruby/1.8/rack/builder.rb	46	in `initialize'
18	config.ru	1	in `new'
19	config.ru	1

Powered by Phusion Passenger, mod_rails / mod_rack for Apache.

I believe the permissions of *.yml are correct as per the instructions.

ls -al config/*.yml
-r-------- 1 canvasuser sysadmin 411 2011-10-31 11:54 config/amazon_s3.yml
-r-------- 1 canvasuser sysadmin 17981 2011-10-31 11:19 config/assets.yml
-r-------- 1 canvasuser sysadmin 387 2011-10-31 14:52 config/cache_store.yml
-r-------- 1 canvasuser sysadmin 938 2011-10-31 12:20 config/database.yml
-r-------- 1 canvasuser sysadmin 653 2011-10-31 11:54 config/delayed_jobs.yml
-r-------- 1 canvasuser sysadmin 229 2011-10-31 12:00 config/domain.yml
-r-------- 1 canvasuser sysadmin 314 2011-10-31 11:54 config/file_store.yml
-r-------- 1 canvasuser sysadmin 629 2011-10-31 12:01 config/outgoing_mail.yml
-r-------- 1 canvasuser sysadmin 234 2011-10-31 12:11 config/security.yml

This is what I see in log/delayed_job -

/home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/mysql_adapter.rb:620:in `real_connect': Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (Mysql::Error)
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/mysql_adapter.rb:620:in `connect'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/mysql_adapter.rb:203:in `initialize'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `new'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `mysql_connection'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
from /home/sysadmin/gems/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
from /var/rails/canvas/vendor/plugins/delayed_job/lib/delayed/pool.rb:119:in `spawn_worker'
from /var/rails/canvas/vendor/plugins/delayed_job/lib/delayed/pool.rb:118:in `fork'
from /var/rails/canvas/vendor/plugins/delayed_job/lib/delayed/pool.rb:118:in `spawn_worker'
from /var/rails/canvas/vendor/plugins/delayed_job/lib/delayed/pool.rb:160:in `join'
from /var/rails/canvas/vendor/plugins/delayed_job/lib/delayed/pool.rb:152:in `loop'
from /var/rails/canvas/vendor/plugins/delayed_job/lib/delayed/pool.rb:152:in `join'
from /var/rails/canvas/vendor/plugins/delayed_job/lib/delayed/pool.rb:76:in `start'
from /var/rails/canvas/vendor/plugins/delayed_job/lib/delayed/pool.rb:45:in `run'
from /var/rails/canvas/script/delayed_job:5
FSSM -> An optimized backend is available for this platform!
FSSM -> gem install rb-inotify
FSSM -> An optimized backend is available for this platform!