Backup failed - Permission issue with user

Hello all,

I am facing issue with taking backup from Admin panel…

Here is what I am getting in Logs…

[2017-12-14 05:01:58] 'user' has started the backup!
[2017-12-14 05:01:58] Marking backup as running...
[2017-12-14 05:01:58] Making sure '/opt/bitnami/apps/discourse/htdocs/tmp/backups/default/2017-12-14-050158' exists...
[2017-12-14 05:01:58] EXCEPTION: Permission denied @ dir_s_mkdir - /opt/bitnami/apps/discourse/htdocs/tmp/backups/default/2017-12-14-050158
[2017-12-14 05:01:58] /opt/bitnami/ruby/lib/ruby/2.3.0/fileutils.rb:254:in `mkdir'
/opt/bitnami/ruby/lib/ruby/2.3.0/fileutils.rb:254:in `fu_mkdir'
/opt/bitnami/ruby/lib/ruby/2.3.0/fileutils.rb:228:in `block (2 levels) in mkdir_p'
/opt/bitnami/ruby/lib/ruby/2.3.0/fileutils.rb:226:in `reverse_each'
/opt/bitnami/ruby/lib/ruby/2.3.0/fileutils.rb:226:in `block in mkdir_p'
/opt/bitnami/ruby/lib/ruby/2.3.0/fileutils.rb:211:in `each'
/opt/bitnami/ruby/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p'
/opt/bitnami/apps/discourse/htdocs/lib/backup_restore/backuper.rb:308:in `ensure_directory_exists'
/opt/bitnami/apps/discourse/htdocs/lib/backup_restore/backuper.rb:26:in `run'
/opt/bitnami/apps/discourse/htdocs/lib/backup_restore/backup_restore.rb:163:in `block in start!'
/opt/bitnami/apps/discourse/htdocs/lib/backup_restore/backup_restore.rb:160:in `fork'
/opt/bitnami/apps/discourse/htdocs/lib/backup_restore/backup_restore.rb:160:in `start!'
/opt/bitnami/apps/discourse/htdocs/lib/backup_restore/backup_restore.rb:15:in `backup!'
/opt/bitnami/apps/discourse/htdocs/app/controllers/admin/backups_controller.rb:32:in `create'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:198:in `process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:164:in `instrument'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:137:in `process'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionview-4.2.8/lib/action_view/rendering.rb:30:in `process'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.4/lib/mini_profiler/profiling_methods.rb:76:in `block in profile_method'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal.rb:196:in `dispatch'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_controller/metal.rb:237:in `block in action'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:43:in `serve'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/mapper.rb:49:in `serve'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in `each'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in `serve'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:817:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:189:in `call!'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb:167:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/builder.rb:63:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/conditionalget.rb:38:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/head.rb:13:in `call'
/opt/bitnami/apps/discourse/htdocs/lib/middleware/anonymous_cache.rb:138:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/flash.rb:260:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:225:in `context'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:220:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/query_cache.rb:36:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/logster-1.2.7/lib/logster/middleware/reporter.rb:31:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/rack/logger.rb:38:in `call_app'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/rack/logger.rb:22:in `call'
/opt/bitnami/apps/discourse/htdocs/config/initializers/100-quiet_logger.rb:17:in `call_with_quiet_assets'
/opt/bitnami/apps/discourse/htdocs/config/initializers/100-silence_logger.rb:29:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/methodoverride.rb:22:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/runtime.rb:18:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/sendfile.rb:113:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-mini-profiler-0.10.4/lib/mini_profiler/profiler.rb:171:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus/rack/middleware.rb:62:in `call'
/opt/bitnami/apps/discourse/htdocs/lib/middleware/request_tracker.rb:73:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/engine.rb:518:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/application.rb:165:in `call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `public_send'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `method_missing'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:66:in `block in call'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in `each'
/opt/bitnami/apps/discourse/htdocs/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in `call'
/opt/bitnami/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:97:in `process_request'
/opt/bitnami/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:160:in `accept_and_process_next_request'
/opt/bitnami/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:113:in `main_loop'
/opt/bitnami/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/request_handler.rb:416:in `block (3 levels) in start_threads'
/opt/bitnami/ruby/lib/ruby/gems/2.3.0/gems/passenger-5.1.2/src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
[2017-12-14 05:01:58] Notifying 'user' of the end of the backup...
[2017-12-14 05:02:09] Removing old backups...
[2017-12-14 05:02:09] Cleaning stuff up...
[2017-12-14 05:02:09] Removing '.tar' leftovers...
[2017-12-14 05:02:09] Unpausing sidekiq...
[2017-12-14 05:02:09] Marking backup as finished...
[2017-12-14 05:02:09] Finished!

Am I missing some permissions?

I am using v1.8.5-dirty

You might want to ask on https://community.bitnami.com/ as we don’t support their installs here.

2 Likes