Tom De Vylder
2011-Sep-27 10:02 UTC
[Puppet Users] [Dashboard] permission denied error when using apache
Hi all,
I''m running into javascript errors using Puppet Dashboard behind an
Apache2/Passenger setup.
"Permission denied -
/usr/share/puppet-dashboard/public/javascripts/all.js"
The permissions inside public/ are ok. The whole public folder is owned by the
Apache user.
And I''m able to browse anything I put inside the javascripts folder.
What''s really strange about this is that it only happens with the
Apache2/Passenger setup.
When I kill the apache daemon and start the puppet-dashboard init script instead
the Dashboard does show up in my browser.
If anyone needs more information that what''s provided below, please let
me know.
Regards,
TomDV
Version numbers:
Debian squeeze
Apache 2.2.11 (debian repo)
Passenger 2.2.11 (debian repo)
Dashboard 1.2.1-1 (puppetlabs package)
Apache config:
Listen 3000
<VirtualHost *:3000>
ServerName dashboard
ServerAlias dashboard.tld puppet.tld
DocumentRoot /usr/share/puppet-dashboard/public/
<Directory /usr/share/puppet-dashboard/public/>
Options None
AllowOverride AuthConfig
Order allow,deny
allow from all
</Directory>
LogLevel warn
ServerSignature On
ErrorLog /var/log/apache2/dashboard_error.log
CustomLog /var/log/apache2/dashboard_access.log combined
# you may want to tune these settings
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RailsAutoDetect On
</VirtualHost>
Full error message from apache log:
*** Exception Errno::EACCES in PhusionPassenger::Railz::ApplicationSpawner
(Permission denied - /usr/share/puppet-dashboard/public/javascripts/all.js)
(process 25835):
from /usr/lib/ruby/1.8/fileutils.rb:1299:in `unlink''
from /usr/lib/ruby/1.8/fileutils.rb:1299:in `remove_file''
from /usr/lib/ruby/1.8/fileutils.rb:1304:in `platform_support''
from /usr/lib/ruby/1.8/fileutils.rb:1298:in `remove_file''
from /usr/lib/ruby/1.8/fileutils.rb:772:in `remove_file''
from /usr/lib/ruby/1.8/fileutils.rb:550:in `rm''
from /usr/lib/ruby/1.8/fileutils.rb:549:in `each''
from /usr/lib/ruby/1.8/fileutils.rb:549:in `rm''
from /usr/share/puppet-dashboard/config/initializers/clear_cached_assets.rb:5
from
/usr/share/puppet-dashboard/config/initializers/clear_cached_assets.rb:2:in
`each''
from /usr/share/puppet-dashboard/config/initializers/clear_cached_assets.rb:2
from
/usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:173:in
`load_without_new_constant_marking''
from
/usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:173:in
`load''
from
/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:622:in
`load_application_initializers''
from
/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:621:in
`each''
from
/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:621:in
`load_application_initializers''
from
/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:176:in
`process''
from
/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:113:in
`send''
from
/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:113:in
`run''
from /usr/share/puppet-dashboard/config/environment.rb:14
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require''
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require''
from /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:303:in
`preload_application''
from /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:252:in
`initialize_server''
from /usr/lib/ruby/1.8/phusion_passenger/utils.rb:255:in
`report_app_init_status''
from /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:237:in
`initialize_server''
from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:194:in
`start_synchronously''
from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in
`start''
from /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in
`start''
from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in
`spawn_rails_application''
from /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in
`lookup_or_add''
from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in
`spawn_rails_application''
from /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in
`synchronize''
from /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in
`synchronize''
from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in
`spawn_rails_application''
from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in
`spawn_application''
from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in
`handle_spawn_application''
from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in
`__send__''
from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in
`main_loop''
from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in
`start_synchronously''
from /usr/lib/phusion_passenger/passenger-spawn-server:61
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Scott Smith
2011-Sep-27 14:10 UTC
Re: [Puppet Users] [Dashboard] permission denied error when using apache
Check the exception. It''s trying to rm all.js On Sep 27, 2011 3:02 AM, "Tom De Vylder" <tom@penumbra.be> wrote:> Hi all, > > I''m running into javascript errors using Puppet Dashboard behind anApache2/Passenger setup.> > "Permission denied -/usr/share/puppet-dashboard/public/javascripts/all.js"> > The permissions inside public/ are ok. The whole public folder is owned bythe Apache user.> And I''m able to browse anything I put inside the javascripts folder. > > What''s really strange about this is that it only happens with theApache2/Passenger setup.> When I kill the apache daemon and start the puppet-dashboard init scriptinstead the Dashboard does show up in my browser.> > If anyone needs more information that what''s provided below, please let meknow.> > Regards, > TomDV > > > > Version numbers: > > Debian squeeze > Apache 2.2.11 (debian repo) > Passenger 2.2.11 (debian repo) > Dashboard 1.2.1-1 (puppetlabs package) > > > Apache config: > > Listen 3000 > <VirtualHost *:3000> > ServerName dashboard > ServerAlias dashboard.tld puppet.tld > DocumentRoot /usr/share/puppet-dashboard/public/ > <Directory /usr/share/puppet-dashboard/public/> > Options None > AllowOverride AuthConfig > Order allow,deny > allow from all > </Directory> > > LogLevel warn > ServerSignature On > ErrorLog /var/log/apache2/dashboard_error.log > CustomLog /var/log/apache2/dashboard_access.log combined > > # you may want to tune these settings > PassengerHighPerformance on > PassengerMaxPoolSize 12 > PassengerPoolIdleTime 1500 > # PassengerMaxRequests 1000 > PassengerStatThrottleRate 120 > RailsAutoDetect On > </VirtualHost> > > > Full error message from apache log: > > *** Exception Errno::EACCES in PhusionPassenger::Railz::ApplicationSpawner(Permission denied - /usr/share/puppet-dashboard/public/javascripts/all.js) (process 25835):> from /usr/lib/ruby/1.8/fileutils.rb:1299:in `unlink'' > from /usr/lib/ruby/1.8/fileutils.rb:1299:in `remove_file'' > from /usr/lib/ruby/1.8/fileutils.rb:1304:in `platform_support'' > from /usr/lib/ruby/1.8/fileutils.rb:1298:in `remove_file'' > from /usr/lib/ruby/1.8/fileutils.rb:772:in `remove_file'' > from /usr/lib/ruby/1.8/fileutils.rb:550:in `rm'' > from /usr/lib/ruby/1.8/fileutils.rb:549:in `each'' > from /usr/lib/ruby/1.8/fileutils.rb:549:in `rm'' > from/usr/share/puppet-dashboard/config/initializers/clear_cached_assets.rb:5> from/usr/share/puppet-dashboard/config/initializers/clear_cached_assets.rb:2:in `each''> from/usr/share/puppet-dashboard/config/initializers/clear_cached_assets.rb:2> from/usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:173:in `load_without_new_constant_marking''> from/usr/share/puppet-dashboard/vendor/rails/activesupport/lib/active_support/dependencies.rb:173:in `load''> from/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:622:in `load_application_initializers''> from/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:621:in `each''> from/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:621:in `load_application_initializers''> from/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:176:in `process''> from/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:113:in `send''> from/usr/share/puppet-dashboard/vendor/rails/railties/lib/initializer.rb:113:in `run''> from /usr/share/puppet-dashboard/config/environment.rb:14 > from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in`gem_original_require''> from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'' > from/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:303:in `preload_application''> from/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:252:in `initialize_server''> from /usr/lib/ruby/1.8/phusion_passenger/utils.rb:255:in`report_app_init_status''> from/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:237:in `initialize_server''> from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:194:in`start_synchronously''> from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'' > from/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start''> from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in`spawn_rails_application''> from/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add''> from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in`spawn_rails_application''> from/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize''> from/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize''> from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in`spawn_rails_application''> from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in`spawn_application''> from /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in`handle_spawn_application''> from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in`__send__''> from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in`main_loop''> from /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in`start_synchronously''> from /usr/lib/phusion_passenger/passenger-spawn-server:61 > > -- > You received this message because you are subscribed to the Google Groups"Puppet Users" group.> To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email topuppet-users+unsubscribe@googlegroups.com.> For more options, visit this group athttp://groups.google.com/group/puppet-users?hl=en.>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Tom De Vylder
2011-Sep-27 14:30 UTC
Re: [Puppet Users] [Dashboard] permission denied error when using apache
On 27 Sep 2011, at 16:10, Scott Smith wrote:> Check the exception. It''s trying to rm all.js >The same happens with stylesheets/all.css. Both files don''t exist on the filesystem, nor are they supplied in the package. # dpkg -c puppet-dashboard_1.2.1-1_all.deb | grep -iE ''all.css|all.js'' # I don''t get why this fails with Apache/Passenger and not with Webrick. TomDV -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Russell Van Tassell
2011-Sep-27 18:49 UTC
Re: [Puppet Users] [Dashboard] permission denied error when using apache
Just FYI/FWIW ... Passenger tries to run (setuid) as the user that owns config.ru... not as the apache user. Ref: http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger On Tue, Sep 27, 2011 at 7:30 AM, Tom De Vylder <tom@penumbra.be> wrote:> On 27 Sep 2011, at 16:10, Scott Smith wrote: > > Check the exception. It''s trying to rm all.js > > > The same happens with stylesheets/all.css. > Both files don''t exist on the filesystem, nor are they supplied in the > package. > > # dpkg -c puppet-dashboard_1.2.1-1_all.deb | grep -iE ''all.css|all.js'' > # > > I don''t get why this fails with Apache/Passenger and not with Webrick. > > TomDV > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Tom De Vylder
2011-Sep-28 09:23 UTC
Re: [Puppet Users] [Dashboard] permission denied error when using apache
On 27 Sep 2011, at 20:49, Russell Van Tassell wrote:> Just FYI/FWIW ... Passenger tries to run (setuid) as the user that owns config.ru... not as the apache user. > > Ref: http://projects.puppetlabs.com/projects/1/wiki/Using_PassengerThanks! That one finally got me on the right track. Even more information on the subject: http://www.modrails.com/documentation/Users%20guide%20Apache.html#user_switching -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.