Project

General

Profile

Uploading files/documents fails

Added by Daniel S almost 14 years ago

Everything else works so far, (I've been using the Wiki extensively), except for uploading. I get these errors from both admin and user accounts. I'm guessing its a Apache incorrect setting somewhere.

In any project go Files, New file, select a file and click add

Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.

Documents, New document, Create gives the same error

I'm running Ubuntu Server 10.04 LTS
Apache (from apt-get) Server version: Apache/2.2.14 (Ubuntu)
Ruby (from apt-get) 1.8.7
Gem (from apt-get) 1.3.5
Rails (from gems) 2.3.5
Passenger (from gems) 2.2.11
Redmine (from Git)

Trying RAILS_ENV=YOUR_ENVIRONMENT script/about gave errors:

daniel@Mustrum:/usr/share/redmine$ RAIL_ENV=production script/about
Rails Error: Unable to access log file. Please ensure that /usr/share/redmine/log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
/var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:589:in `real_connect': Access denied for user 'root'@'localhost' (using password: NO) (Mysql::Error)
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:589:in `connect'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:203:in `initialize'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `new'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:75:in `mysql_connection'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
        from /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
        from /usr/share/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in `quoted_left_column_name'
        from /usr/share/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in `acts_as_nested_set'
        from /usr/share/redmine/app/models/project.rb:54
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load_without_engine_additions'
        from /usr/share/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:96:in `const_missing'
        from /usr/share/redmine/app/models/attachment.rb:36
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load_without_engine_additions'
        from /usr/share/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in `load_missing_constant'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
        from /usr/share/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:33:in `acts_as_attachable'
        from /usr/share/redmine/app/models/message.rb:22
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_without_new_constant_marking'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in `load_file'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in `load_file'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in `require_or_load_without_engine_additions'
        from /usr/share/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in `require_or_load'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in `load_missing_constant'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in `const_missing'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:361:in `constantize'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `each'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/inflector.rb:360:in `constantize'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/inflections.rb:162:in `constantize'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in `observed_class'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in `observed_classes'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in `initialize'
        from /usr/lib/ruby/1.8/singleton.rb:94:in `new'
        from /usr/lib/ruby/1.8/singleton.rb:94:in `instance'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in `instantiate_observers'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in `each'
        from /var/lib/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in `instantiate_observers'
        from /var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `call'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in `evaluate_method'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `each'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `send'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in `run'
        from /var/lib/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
        from /var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `send'
        from /var/lib/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in `run_prepare_callbacks'
        from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in `prepare_dispatcher'
        from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in `process'
        from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
        from /var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
        from /usr/share/redmine/config/environment.rb:20
        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 /var/lib/gems/1.8/gems/rails-2.3.5/lib/commands/about.rb:1
        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 script/about:4


Replies (21)

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

Oh and MySQL Ver 14.14

RE: Uploading files/documents fails - Added by Felix Schäfer almost 14 years ago

Try this as root, I'm not sure you have enough permissions to execute all that is needed for script/about. Also have a look at the redmine_dir/logs/production.log after you get this error to see the error trace.

RE: Uploading files/documents fails - Added by Felix Schäfer almost 14 years ago

Just a thought: it seems some of your permissions are off indeed, have a look at the installation guide and make sure your redmine_dir/file, redmine_dir/log, redmine_dir/tmp and redmine_dir/public/plugin_assets have permissions that passenger can access and write to.

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

www-data (I think that's the user apache and thus passenger uses) has permission as per:


daniel@Mustrum:/usr/share/redmine$ sudo RAILS_ENV=production script/about
[sudo] password for daniel:
About your application's environment
Ruby version              1.8.7 (x86_64-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /usr/share/redmine
Environment               production
Database adapter          mysql
Database schema version   20100221100219

daniel@Mustrum:/$ ls -al
drwxr-xr-x  23 root root  4096 2010-05-19 16:40 .
drwxr-xr-x  23 root root  4096 2010-05-19 16:40 ..
drwxr-xr-x  10 root root  4096 2010-05-07 04:59 usr

daniel@Mustrum:/usr$ ls -al
drwxr-xr-x  10 root root  4096 2010-05-07 04:59 .
drwxr-xr-x  23 root root  4096 2010-05-19 16:40 ..
drwxr-xr-x 115 root root  4096 2010-05-18 19:35 share

daniel@Mustrum:/usr/share$ ls -al
drwxr-xr-x 115 root   root    4096 2010-05-18 19:35 .
drwxr-xr-x  10 root   root    4096 2010-05-07 04:59 ..
drwxr-xr-x  16 daniel daniel  4096 2010-05-16 20:41 redmine

daniel@Mustrum:/usr/share/redmine$ ls -al
drwxr-xr-x  16 daniel   daniel   4096 2010-05-16 20:41 .
drwxr-xr-x 115 root     root     4096 2010-05-18 19:35 ..
drwxr-xr-x   6 daniel   daniel   4096 2010-05-16 20:41 app
drwxr-xr-x   5 daniel   daniel   4096 2010-05-16 21:16 config
drwxr-xr-x   3 daniel   daniel   4096 2010-05-16 21:21 db
drwxr-xr-x   2 daniel   daniel   4096 2010-05-16 20:41 doc
drwxr-xr-x   5 daniel   daniel   4096 2010-05-16 20:41 extra
drwxr-xr-x   2 www-data www-data 4096 2010-05-16 20:41 files
drwxr-xr-x   8 daniel   daniel   4096 2010-05-16 20:41 .git
-rw-r--r--   1 daniel   daniel    316 2010-05-16 20:41 .gitignore
drwxr-xr-x   6 daniel   daniel   4096 2010-05-16 20:41 lib
drwxr-xr-x   2 www-data www-data 4096 2010-05-16 21:20 log
drwxr-xr-x   8 daniel   daniel   4096 2010-05-18 20:18 public
-rw-r--r--   1 daniel   daniel    307 2010-05-16 20:41 Rakefile
-rw-r--r--   1 daniel   daniel    160 2010-05-16 20:41 README.rdoc
drwxr-xr-x   4 daniel   daniel   4096 2010-05-16 20:41 script
drwxr-xr-x   8 daniel   daniel   4096 2010-05-16 20:41 test
drwxr-xr-x   7 www-data www-data 4096 2010-05-16 21:23 tmp
drwxr-xr-x   4 www-data www-data 4096 2010-05-16 20:41 vendor

daniel@Mustrum:/usr/share/redmine/log$ ls -al
drwxr-xr-x  2 www-data www-data 4096 2010-05-16 21:20 .
drwxr-xr-x 16 daniel   daniel   4096 2010-05-16 20:41 ..
-rw-r--r--  1 www-data www-data   36 2010-05-16 20:41 delete.me
-rw-r--r--  1 www-data www-data 8172 2010-05-16 21:27 production.log

daniel@Mustrum:/usr/share/redmine/public$ ls -al
total 56
drwxr-xr-x  8 daniel daniel 4096 2010-05-18 20:18 .
drwxr-xr-x 16 daniel daniel 4096 2010-05-16 20:41 ..
-rw-r--r--  1 daniel daniel  484 2010-05-16 20:41 404.html
-rw-r--r--  1 daniel daniel  576 2010-05-16 20:41 500.html
-rwxr-xr-x  1 root   root    513 2010-05-18 20:23 dispatch.cgi
-rwxr-xr-x  1 daniel daniel  477 2010-05-16 20:41 dispatch.cgi.example
-rwxr-xr-x  1 daniel daniel  859 2010-05-16 20:41 dispatch.fcgi.example
-rwxr-xr-x  1 daniel daniel  477 2010-05-16 20:41 dispatch.rb.example
-rw-r--r--  1 daniel daniel    0 2010-05-16 20:41 favicon.ico
drwxr-xr-x  2 daniel daniel 4096 2010-05-16 20:41 help
drwxr-xr-x  4 daniel daniel 4096 2010-05-16 20:41 images
drwxr-xr-x  4 daniel daniel 4096 2010-05-16 20:41 javascripts
drwxr-xr-x  2 daniel daniel 4096 2010-05-16 21:20 plugin_assets
drwxr-xr-x  2 daniel daniel 4096 2010-05-16 20:41 stylesheets
drwxr-xr-x  4 daniel daniel 4096 2010-05-16 20:41 themes

daniel@Mustrum:/usr/share/redmine/public/plugin_assets$ ls -al
total 12
drwxr-xr-x 2 daniel daniel 4096 2010-05-16 21:20 .
drwxr-xr-x 8 daniel daniel 4096 2010-05-18 20:18 ..
-rw-r--r-- 1 daniel daniel  374 2010-05-16 21:20 README

daniel@Mustrum:/usr/share/redmine/files$ ls -al
total 12
drwxr-xr-x  2 www-data www-data 4096 2010-05-16 20:41 .
drwxr-xr-x 16 daniel   daniel   4096 2010-05-16 20:41 ..
-rw-r--r--  1 www-data www-data   36 2010-05-16 20:41 delete.me

daniel@Mustrum:/usr/share/redmine/tmp$ ls -al
total 28
drwxr-xr-x  7 www-data www-data 4096 2010-05-16 21:23 .
drwxr-xr-x 16 daniel   daniel   4096 2010-05-16 20:41 ..
drwxr-xr-x  2 www-data www-data 4096 2010-05-16 21:23 cache
drwxr-xr-x  2 www-data www-data 4096 2010-05-16 21:23 pids
drwxr-xr-x  2 www-data www-data 4096 2010-05-16 21:23 sessions
drwxr-xr-x  2 www-data www-data 4096 2010-05-16 21:23 sockets
drwxr-xr-x  2 www-data www-data 4096 2010-05-16 20:41 test

RE: Uploading files/documents fails - Added by Felix Schäfer almost 14 years ago

Daniel S wrote:

www-data (I think that's the user apache and thus passenger uses)

Not necessarily, but we'll get back to that later.

Now I'm a little surprised to see a dispatch.cgi in you public folder, but I'll assume that you really have passenger configured.

Again: please have a look at the redmine_dir/log/production.log and paste the trace of the error here.

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

Before trying to upload a file

daniel@Mustrum:/usr/share/redmine/log$ cat production.log
# Logfile created on Sun May 16 21:20:23 +0800 2010

Processing WelcomeController#index (for 192.168.1.3 at 2010-05-16 21:24:15) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 314ms (View: 84, DB: 101) | 200 OK [http://192.168.1.73/]

Processing WelcomeController#index (for 192.168.1.3 at 2010-05-16 21:24:29) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 65ms (View: 37, DB: 2) | 200 OK [http://192.168.1.73/]

Processing AccountController#login (for 192.168.1.3 at 2010-05-16 21:24:36) [GET]
  Parameters: {"action"=>"login", "controller"=>"account"}
Rendering template within layouts/base
Rendering account/login
Completed in 75ms (View: 56, DB: 2) | 200 OK [http://192.168.1.73/login]

Processing AccountController#login (for 192.168.1.3 at 2010-05-16 21:24:41) [POST]
  Parameters: {"back_url"=>"http%3A%2F%2F192.168.1.73%3A3000%2F", "action"=>"login", "authenticity_token"=>"FTv51H8/gSW0FvAE+9PvmS768IDrOAkaDnk26vZplXA=", "username"=>"admin", "controller"=>"account", "password"=>"[FILTERED]", "login"=>"Login \302\273"}
Redirected to http://192.168.1.73:3000/
Completed in 95ms (DB: 62) | 302 Found [http://192.168.1.73/login]

Processing WelcomeController#index (for 192.168.1.3 at 2010-05-16 21:24:41) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 250ms (View: 96, DB: 135) | 200 OK [http://192.168.1.73/]

Processing MyController#account (for 192.168.1.3 at 2010-05-16 21:25:03) [GET]
  Parameters: {"action"=>"account", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/account
Completed in 470ms (View: 346, DB: 84) | 200 OK [http://192.168.1.73/my/account]

Processing MyController#account (for 192.168.1.3 at 2010-05-16 21:25:30) [POST]
  Parameters: {"commit"=>"Save", "action"=>"account", "authenticity_token"=>"0SWM8GWhjDr7tZKo192JGpHpp2SWtToWNf8RJgr1XyI=", "pref"=>{"hide_mail"=>"0", "comments_sorting"=>"asc", "time_zone"=>"Perth"}, "controller"=>"my", "user"=>{"language"=>"en", "mail"=>"admin@example.net", "lastname"=>"Admin", "firstname"=>"Redmine"}, "notification_option"=>"all"}
Redirected to http://192.168.1.73:3000/my/account
Completed in 571ms (DB: 73) | 302 Found [http://192.168.1.73/my/account]

Processing MyController#account (for 192.168.1.3 at 2010-05-16 21:25:31) [GET]
  Parameters: {"action"=>"account", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/account
Completed in 197ms (View: 177, DB: 3) | 200 OK [http://192.168.1.73/my/account]

Processing MyController#password (for 192.168.1.3 at 2010-05-16 21:25:39) [GET]
  Parameters: {"action"=>"password", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/password
Completed in 75ms (View: 65, DB: 2) | 200 OK [http://192.168.1.73/my/password]

Processing MyController#password (for 192.168.1.3 at 2010-05-16 21:25:52) [POST]
  Parameters: {"commit"=>"Apply", "action"=>"password", "authenticity_token"=>"0SWM8GWhjDr7tZKo192JGpHpp2SWtToWNf8RJgr1XyI=", "new_password"=>"[FILTERED]", "controller"=>"my", "new_password_confirmation"=>"[FILTERED]", "password"=>"[FILTERED]"}
Redirected to http://192.168.1.73:3000/my/account
Completed in 102ms (DB: 73) | 302 Found [http://192.168.1.73/my/password]

Processing MyController#account (for 192.168.1.3 at 2010-05-16 21:25:53) [GET]
  Parameters: {"action"=>"account", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/account
Completed in 131ms (View: 107, DB: 2) | 200 OK [http://192.168.1.73/my/account]

Processing WelcomeController#index (for 192.168.1.3 at 2010-05-16 21:26:01) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 64ms (View: 43, DB: 3) | 200 OK [http://192.168.1.73/]

Processing MyController#page (for 192.168.1.3 at 2010-05-16 21:26:02) [GET]
  Parameters: {"action"=>"page", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/page
Completed in 157ms (View: 130, DB: 16) | 200 OK [http://192.168.1.73/my/page]

Processing ProjectsController#index (for 192.168.1.3 at 2010-05-16 21:26:05) [GET]
  Parameters: {"action"=>"index", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/index
Completed in 83ms (View: 61, DB: 2) | 200 OK [http://192.168.1.73/projects]

Processing AdminController#index (for 192.168.1.3 at 2010-05-16 21:26:08) [GET]
  Parameters: {"action"=>"index", "controller"=>"admin"}
Rendering template within layouts/admin
Rendering admin/index
Completed in 126ms (View: 100, DB: 2) | 200 OK [http://192.168.1.73/admin]

Processing ProjectsController#index (for 192.168.1.3 at 2010-05-16 21:26:20) [GET]
  Parameters: {"action"=>"index", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/index
Completed in 55ms (View: 41, DB: 1) | 200 OK [http://192.168.1.73/projects]

Processing ProjectsController#add (for 192.168.1.3 at 2010-05-16 21:26:51) [GET]
  Parameters: {"action"=>"add", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/add
Completed in 186ms (View: 109, DB: 15) | 200 OK [http://192.168.1.73/projects/new]

Processing ProjectsController#add (for 192.168.1.3 at 2010-05-16 21:27:16) [POST]
  Parameters: {"enabled_modules"=>["issue_tracking", "time_tracking", "news", "documents", "files", "wiki", "repository", "boards"], "commit"=>"Save", "action"=>"add", "authenticity_token"=>"0SWM8GWhjDr7tZKo192JGpHpp2SWtToWNf8RJgr1XyI=", "project"=>{"name"=>"myfirstproject", "tracker_ids"=>["1", "2", "3", ""], "homepage"=>"", "is_public"=>"1", "description"=>"look at the name", "identifier"=>"firstproject"}, "controller"=>"projects"}
Redirected to http://192.168.1.73:3000/projects/firstproject/settings
Completed in 525ms (DB: 108) | 302 Found [http://192.168.1.73/projects/new]

Processing ProjectsController#settings (for 192.168.1.3 at 2010-05-16 21:27:17) [GET]
  Parameters: {"action"=>"settings", "id"=>"firstproject", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/settings
Completed in 756ms (View: 682, DB: 35) | 200 OK [http://192.168.1.73/projects/firstproject/settings]

Processing ProjectsController#index (for 192.168.1.3 at 2010-05-16 21:27:28) [GET]
  Parameters: {"action"=>"index", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/index
Completed in 70ms (View: 53, DB: 5) | 200 OK [http://192.168.1.73/projects]

Processing ProjectsController#show (for 192.168.1.3 at 2010-05-16 21:27:30) [GET]
  Parameters: {"action"=>"show", "id"=>"firstproject", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/show
Completed in 477ms (View: 392, DB: 22) | 200 OK [http://192.168.1.73/projects/firstproject]

Processing WikiController#index (for 192.168.1.3 at 2010-05-16 21:27:33) [GET]
  Parameters: {"action"=>"index", "id"=>"firstproject", "controller"=>"wiki"}
Rendering template within layouts/base
Rendering wiki/edit
Completed in 187ms (View: 107, DB: 10) | 200 OK [http://192.168.1.73/projects/firstproject/wiki]

Processing WikiController#edit (for 192.168.1.3 at 2010-05-16 21:27:44) [POST]
  Parameters: {"commit"=>"Save", "action"=>"edit", "authenticity_token"=>"0SWM8GWhjDr7tZKo192JGpHpp2SWtToWNf8RJgr1XyI=", "id"=>"firstproject", "page"=>"Wiki", "content"=>{"comments"=>"", "text"=>"h1. Wiki\r\n\r\nhello", "version"=>"0"}, "controller"=>"wiki"}
Redirected to http://192.168.1.73:3000/projects/firstproject/wiki/Wiki
Completed in 174ms (DB: 88) | 302 Found [http://192.168.1.73/projects/firstproject/wiki/Wiki/edit]

Processing WikiController#index (for 192.168.1.3 at 2010-05-16 21:27:45) [GET]
  Parameters: {"action"=>"index", "id"=>"firstproject", "page"=>"Wiki", "controller"=>"wiki"}
Rendering template within layouts/base
Rendering wiki/show
Completed in 244ms (View: 201, DB: 13) | 200 OK [http://192.168.1.73/projects/firstproject/wiki/Wiki]
daniel@Mustrum:/usr/share/redmine/log$

After trying to upload a file

daniel@Mustrum:/usr/share/redmine/log$ cat production.log
# Logfile created on Sun May 16 21:20:23 +0800 2010

Processing WelcomeController#index (for 192.168.1.3 at 2010-05-16 21:24:15) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 314ms (View: 84, DB: 101) | 200 OK [http://192.168.1.73/]

Processing WelcomeController#index (for 192.168.1.3 at 2010-05-16 21:24:29) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 65ms (View: 37, DB: 2) | 200 OK [http://192.168.1.73/]

Processing AccountController#login (for 192.168.1.3 at 2010-05-16 21:24:36) [GET]
  Parameters: {"action"=>"login", "controller"=>"account"}
Rendering template within layouts/base
Rendering account/login
Completed in 75ms (View: 56, DB: 2) | 200 OK [http://192.168.1.73/login]

Processing AccountController#login (for 192.168.1.3 at 2010-05-16 21:24:41) [POST]
  Parameters: {"back_url"=>"http%3A%2F%2F192.168.1.73%3A3000%2F", "action"=>"login", "authenticity_token"=>"FTv51H8/gSW0FvAE+9PvmS768IDrOAkaDnk26vZplXA=", "username"=>"admin", "controller"=>"account", "password"=>"[FILTERED]", "login"=>"Login \302\273"}
Redirected to http://192.168.1.73:3000/
Completed in 95ms (DB: 62) | 302 Found [http://192.168.1.73/login]

Processing WelcomeController#index (for 192.168.1.3 at 2010-05-16 21:24:41) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 250ms (View: 96, DB: 135) | 200 OK [http://192.168.1.73/]

Processing MyController#account (for 192.168.1.3 at 2010-05-16 21:25:03) [GET]
  Parameters: {"action"=>"account", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/account
Completed in 470ms (View: 346, DB: 84) | 200 OK [http://192.168.1.73/my/account]

Processing MyController#account (for 192.168.1.3 at 2010-05-16 21:25:30) [POST]
  Parameters: {"commit"=>"Save", "action"=>"account", "authenticity_token"=>"0SWM8GWhjDr7tZKo192JGpHpp2SWtToWNf8RJgr1XyI=", "pref"=>{"hide_mail"=>"0", "comments_sorting"=>"asc", "time_zone"=>"Perth"}, "controller"=>"my", "user"=>{"language"=>"en", "mail"=>"admin@example.net", "lastname"=>"Admin", "firstname"=>"Redmine"}, "notification_option"=>"all"}
Redirected to http://192.168.1.73:3000/my/account
Completed in 571ms (DB: 73) | 302 Found [http://192.168.1.73/my/account]

Processing MyController#account (for 192.168.1.3 at 2010-05-16 21:25:31) [GET]
  Parameters: {"action"=>"account", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/account
Completed in 197ms (View: 177, DB: 3) | 200 OK [http://192.168.1.73/my/account]

Processing MyController#password (for 192.168.1.3 at 2010-05-16 21:25:39) [GET]
  Parameters: {"action"=>"password", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/password
Completed in 75ms (View: 65, DB: 2) | 200 OK [http://192.168.1.73/my/password]

Processing MyController#password (for 192.168.1.3 at 2010-05-16 21:25:52) [POST]
  Parameters: {"commit"=>"Apply", "action"=>"password", "authenticity_token"=>"0SWM8GWhjDr7tZKo192JGpHpp2SWtToWNf8RJgr1XyI=", "new_password"=>"[FILTERED]", "controller"=>"my", "new_password_confirmation"=>"[FILTERED]", "password"=>"[FILTERED]"}
Redirected to http://192.168.1.73:3000/my/account
Completed in 102ms (DB: 73) | 302 Found [http://192.168.1.73/my/password]

Processing MyController#account (for 192.168.1.3 at 2010-05-16 21:25:53) [GET]
  Parameters: {"action"=>"account", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/account
Completed in 131ms (View: 107, DB: 2) | 200 OK [http://192.168.1.73/my/account]

Processing WelcomeController#index (for 192.168.1.3 at 2010-05-16 21:26:01) [GET]
  Parameters: {"action"=>"index", "controller"=>"welcome"}
Rendering template within layouts/base
Rendering welcome/index
Completed in 64ms (View: 43, DB: 3) | 200 OK [http://192.168.1.73/]

Processing MyController#page (for 192.168.1.3 at 2010-05-16 21:26:02) [GET]
  Parameters: {"action"=>"page", "controller"=>"my"}
Rendering template within layouts/base
Rendering my/page
Completed in 157ms (View: 130, DB: 16) | 200 OK [http://192.168.1.73/my/page]

Processing ProjectsController#index (for 192.168.1.3 at 2010-05-16 21:26:05) [GET]
  Parameters: {"action"=>"index", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/index
Completed in 83ms (View: 61, DB: 2) | 200 OK [http://192.168.1.73/projects]

Processing AdminController#index (for 192.168.1.3 at 2010-05-16 21:26:08) [GET]
  Parameters: {"action"=>"index", "controller"=>"admin"}
Rendering template within layouts/admin
Rendering admin/index
Completed in 126ms (View: 100, DB: 2) | 200 OK [http://192.168.1.73/admin]

Processing ProjectsController#index (for 192.168.1.3 at 2010-05-16 21:26:20) [GET]
  Parameters: {"action"=>"index", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/index
Completed in 55ms (View: 41, DB: 1) | 200 OK [http://192.168.1.73/projects]

Processing ProjectsController#add (for 192.168.1.3 at 2010-05-16 21:26:51) [GET]
  Parameters: {"action"=>"add", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/add
Completed in 186ms (View: 109, DB: 15) | 200 OK [http://192.168.1.73/projects/new]

Processing ProjectsController#add (for 192.168.1.3 at 2010-05-16 21:27:16) [POST]
  Parameters: {"enabled_modules"=>["issue_tracking", "time_tracking", "news", "documents", "files", "wiki", "repository", "boards"], "commit"=>"Save", "action"=>"add", "authenticity_token"=>"0SWM8GWhjDr7tZKo192JGpHpp2SWtToWNf8RJgr1XyI=", "project"=>{"name"=>"myfirstproject", "tracker_ids"=>["1", "2", "3", ""], "homepage"=>"", "is_public"=>"1", "description"=>"look at the name", "identifier"=>"firstproject"}, "controller"=>"projects"}
Redirected to http://192.168.1.73:3000/projects/firstproject/settings
Completed in 525ms (DB: 108) | 302 Found [http://192.168.1.73/projects/new]

Processing ProjectsController#settings (for 192.168.1.3 at 2010-05-16 21:27:17) [GET]
  Parameters: {"action"=>"settings", "id"=>"firstproject", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/settings
Completed in 756ms (View: 682, DB: 35) | 200 OK [http://192.168.1.73/projects/firstproject/settings]

Processing ProjectsController#index (for 192.168.1.3 at 2010-05-16 21:27:28) [GET]
  Parameters: {"action"=>"index", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/index
Completed in 70ms (View: 53, DB: 5) | 200 OK [http://192.168.1.73/projects]

Processing ProjectsController#show (for 192.168.1.3 at 2010-05-16 21:27:30) [GET]
  Parameters: {"action"=>"show", "id"=>"firstproject", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/show
Completed in 477ms (View: 392, DB: 22) | 200 OK [http://192.168.1.73/projects/firstproject]

Processing WikiController#index (for 192.168.1.3 at 2010-05-16 21:27:33) [GET]
  Parameters: {"action"=>"index", "id"=>"firstproject", "controller"=>"wiki"}
Rendering template within layouts/base
Rendering wiki/edit
Completed in 187ms (View: 107, DB: 10) | 200 OK [http://192.168.1.73/projects/firstproject/wiki]

Processing WikiController#edit (for 192.168.1.3 at 2010-05-16 21:27:44) [POST]
  Parameters: {"commit"=>"Save", "action"=>"edit", "authenticity_token"=>"0SWM8GWhjDr7tZKo192JGpHpp2SWtToWNf8RJgr1XyI=", "id"=>"firstproject", "page"=>"Wiki", "content"=>{"comments"=>"", "text"=>"h1. Wiki\r\n\r\nhello", "version"=>"0"}, "controller"=>"wiki"}
Redirected to http://192.168.1.73:3000/projects/firstproject/wiki/Wiki
Completed in 174ms (DB: 88) | 302 Found [http://192.168.1.73/projects/firstproject/wiki/Wiki/edit]

Processing WikiController#index (for 192.168.1.3 at 2010-05-16 21:27:45) [GET]
  Parameters: {"action"=>"index", "id"=>"firstproject", "page"=>"Wiki", "controller"=>"wiki"}
Rendering template within layouts/base
Rendering wiki/show
Completed in 244ms (View: 201, DB: 13) | 200 OK [http://192.168.1.73/projects/firstproject/wiki/Wiki]
daniel@Mustrum:/usr/share/redmine/log$

I don't think its changed, and the log's from 6 days ago, so I don't think its the right log. Either the log's not getting written to or a different one is

RE: Uploading files/documents fails - Added by Felix Schäfer almost 14 years ago

Ok, so passenger doesn't have write rights to the files, because it doesn't necessarily run as the same user as apache. See here for some documentation http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerDefaultUser , and/or see with 'ps aux' or something equivalent what user the Rails processes runs at (the process should be called "Rails: /usr/share/redmine" or something like that).

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

I got this output

daniel@Mustrum:~/public_html/logs$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  23704  1880 ?        Ss   May19   0:01 /sbin/init
root         2  0.0  0.0      0     0 ?        S    May19   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    May19   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S    May19   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    May19   0:00 [watchdog/0]
root         6  0.0  0.0      0     0 ?        S    May19   0:00 [migration/1]
root         7  0.0  0.0      0     0 ?        S    May19   0:00 [ksoftirqd/1]
root         8  0.0  0.0      0     0 ?        S    May19   0:00 [watchdog/1]
root         9  0.0  0.0      0     0 ?        S    May19   0:00 [migration/2]
root        10  0.0  0.0      0     0 ?        S    May19   0:00 [ksoftirqd/2]
root        11  0.0  0.0      0     0 ?        S    May19   0:00 [watchdog/2]
root        12  0.0  0.0      0     0 ?        S    May19   0:00 [migration/3]
root        13  0.0  0.0      0     0 ?        S    May19   0:00 [ksoftirqd/3]
root        14  0.0  0.0      0     0 ?        S    May19   0:00 [watchdog/3]
root        15  0.0  0.0      0     0 ?        S    May19   0:00 [events/0]
root        16  0.0  0.0      0     0 ?        S    May19   0:00 [events/1]
root        17  0.0  0.0      0     0 ?        S    May19   0:00 [events/2]
root        18  0.0  0.0      0     0 ?        S    May19   0:00 [events/3]
root        19  0.0  0.0      0     0 ?        S    May19   0:00 [cpuset]
root        20  0.0  0.0      0     0 ?        S    May19   0:00 [khelper]
root        21  0.0  0.0      0     0 ?        S    May19   0:00 [netns]
root        22  0.0  0.0      0     0 ?        S    May19   0:00 [async/mgr]
root        23  0.0  0.0      0     0 ?        S    May19   0:00 [pm]
root        25  0.0  0.0      0     0 ?        S    May19   0:00 [sync_supers]
root        26  0.0  0.0      0     0 ?        S    May19   0:00 [bdi-default]
root        27  0.0  0.0      0     0 ?        S    May19   0:00 [kintegrityd/0]
root        28  0.0  0.0      0     0 ?        S    May19   0:00 [kintegrityd/1]
root        29  0.0  0.0      0     0 ?        S    May19   0:00 [kintegrityd/2]
root        30  0.0  0.0      0     0 ?        S    May19   0:00 [kintegrityd/3]
root        31  0.0  0.0      0     0 ?        S    May19   0:00 [kblockd/0]
root        32  0.0  0.0      0     0 ?        S    May19   0:00 [kblockd/1]
root        33  0.0  0.0      0     0 ?        S    May19   0:00 [kblockd/2]
root        34  0.0  0.0      0     0 ?        S    May19   0:00 [kblockd/3]
root        35  0.0  0.0      0     0 ?        S    May19   0:00 [kacpid]
root        36  0.0  0.0      0     0 ?        S    May19   0:00 [kacpi_notify]
root        37  0.0  0.0      0     0 ?        S    May19   0:00 [kacpi_hotplug]
root        38  0.0  0.0      0     0 ?        S    May19   0:00 [ata/0]
root        39  0.0  0.0      0     0 ?        S    May19   0:00 [ata/1]
root        40  0.0  0.0      0     0 ?        S    May19   0:00 [ata/2]
root        41  0.0  0.0      0     0 ?        S    May19   0:00 [ata/3]
root        42  0.0  0.0      0     0 ?        S    May19   0:00 [ata_aux]
root        43  0.0  0.0      0     0 ?        S    May19   0:00 [ksuspend_usbd]
root        44  0.0  0.0      0     0 ?        S    May19   0:00 [khubd]
root        45  0.0  0.0      0     0 ?        S    May19   0:00 [kseriod]
root        46  0.0  0.0      0     0 ?        S    May19   0:00 [kmmcd]
root        51  0.0  0.0      0     0 ?        S    May19   0:00 [khungtaskd]
root        52  0.0  0.0      0     0 ?        S    May19   0:00 [kswapd0]
root        53  0.0  0.0      0     0 ?        SN   May19   0:00 [ksmd]
root        54  0.0  0.0      0     0 ?        S    May19   0:00 [aio/0]
root        55  0.0  0.0      0     0 ?        S    May19   0:00 [aio/1]
root        56  0.0  0.0      0     0 ?        S    May19   0:00 [aio/2]
root        57  0.0  0.0      0     0 ?        S    May19   0:00 [aio/3]
root        58  0.0  0.0      0     0 ?        S    May19   0:00 [ecryptfs-kthrea]
root        59  0.0  0.0      0     0 ?        S    May19   0:00 [crypto/0]
root        60  0.0  0.0      0     0 ?        S    May19   0:00 [crypto/1]
root        61  0.0  0.0      0     0 ?        S    May19   0:00 [crypto/2]
root        62  0.0  0.0      0     0 ?        S    May19   0:00 [crypto/3]
root        65  0.0  0.0      0     0 ?        S    May19   0:00 [kstriped]
root        66  0.0  0.0      0     0 ?        S    May19   0:00 [kmpathd/0]
root        67  0.0  0.0      0     0 ?        S    May19   0:00 [kmpathd/1]
root        68  0.0  0.0      0     0 ?        S    May19   0:00 [kmpathd/2]
root        69  0.0  0.0      0     0 ?        S    May19   0:00 [kmpathd/3]
root        70  0.0  0.0      0     0 ?        S    May19   0:00 [kmpath_handlerd]
root        71  0.0  0.0      0     0 ?        S    May19   0:00 [ksnapd]
root        72  0.0  0.0      0     0 ?        S    May19   0:00 [kondemand/0]
root        73  0.0  0.0      0     0 ?        S    May19   0:00 [kondemand/1]
root        74  0.0  0.0      0     0 ?        S    May19   0:00 [kondemand/2]
root        75  0.0  0.0      0     0 ?        S    May19   0:00 [kondemand/3]
root        76  0.0  0.0      0     0 ?        S    May19   0:00 [kconservative/0]
root        77  0.0  0.0      0     0 ?        S    May19   0:00 [kconservative/1]
root        78  0.0  0.0      0     0 ?        S    May19   0:00 [kconservative/2]
root        79  0.0  0.0      0     0 ?        S    May19   0:00 [kconservative/3]
root       262  0.0  0.0      0     0 ?        S    May19   0:00 [scsi_eh_0]
root       263  0.0  0.0      0     0 ?        S    May19   0:00 [scsi_eh_1]
root       264  0.0  0.0      0     0 ?        S    May19   0:00 [scsi_eh_2]
root       265  0.0  0.0      0     0 ?        S    May19   0:00 [scsi_eh_3]
root       266  0.0  0.0      0     0 ?        S    May19   0:00 [scsi_eh_4]
root       267  0.0  0.0      0     0 ?        S    May19   0:00 [scsi_eh_5]
root       288  0.0  0.0      0     0 ?        S    May19   0:00 [kdmflush]
root       292  0.0  0.0      0     0 ?        S    May19   0:00 [kdmflush]
root       307  0.0  0.0      0     0 ?        S    May19   0:00 [jbd2/dm-0-8]
root       308  0.0  0.0      0     0 ?        S    May19   0:00 [ext4-dio-unwrit]
root       309  0.0  0.0      0     0 ?        S    May19   0:00 [ext4-dio-unwrit]
root       310  0.0  0.0      0     0 ?        S    May19   0:00 [ext4-dio-unwrit]
root       311  0.0  0.0      0     0 ?        S    May19   0:00 [ext4-dio-unwrit]
root       354  0.0  0.0  17024   948 ?        S    May19   0:00 upstart-udev-bridge --daemon
root       377  0.0  0.0  17096   880 ?        S<s  May19   0:00 udevd --daemon
root       556  0.0  0.0  17136   784 ?        S<   May19   0:00 udevd --daemon
root       557  0.0  0.0  17136   784 ?        S<   May19   0:00 udevd --daemon
root       605  0.0  0.0      0     0 ?        S    May19   0:00 [kpsmoused]
root       638  0.0  0.0      0     0 ?        S    May19   0:00 [nouveau/0]
root       639  0.0  0.0      0     0 ?        S    May19   0:00 [nouveau/1]
root       640  0.0  0.0      0     0 ?        S    May19   0:00 [nouveau/2]
root       641  0.0  0.0      0     0 ?        S    May19   0:00 [nouveau/3]
root       670  0.0  0.0      0     0 ?        S    May19   0:00 [hd-audio0]
root       671  0.0  0.0      0     0 ?        S    May19   0:00 [ttm_swap]
syslog     701  0.0  0.0 125968  1684 ?        Sl   May19   0:01 rsyslogd -c4
root       740  0.0  0.0  49252  1112 ?        Ss   May19   0:01 /usr/sbin/sshd
root       767  0.0  0.0   6072   648 tty4     Ss+  May19   0:00 /sbin/getty -8 38400 tty4
root       774  0.0  0.0   6072   652 tty5     Ss+  May19   0:00 /sbin/getty -8 38400 tty5
root       778  0.0  0.0   6072   652 tty2     Ss+  May19   0:00 /sbin/getty -8 38400 tty2
root       779  0.0  0.0   6072   648 tty3     Ss+  May19   0:00 /sbin/getty -8 38400 tty3
root       781  0.0  0.0   6072   648 tty6     Ss+  May19   0:00 /sbin/getty -8 38400 tty6
mysql      783  0.0  0.8 180404 29764 ?        Ssl  May19   2:32 /usr/sbin/mysqld
root       787  0.0  0.0  21068  1020 ?        Ss   May19   0:00 cron
daemon     788  0.0  0.0  18876   460 ?        Ss   May19   0:00 atd
root       792  0.0  0.0  11276   636 ?        Ss   May19   0:00 /usr/sbin/irqbalance
root       900  0.0  0.3 187764 12852 ?        Ss   May19   0:09 /usr/sbin/apache2 -k start
root       950  0.0  0.0   6072   648 tty1     Ss+  May19   0:00 /sbin/getty -8 38400 tty1
root      7173  0.0  0.0  89304  2104 ?        Sl   14:01   0:00 /var/lib/gems/1.8/gems/passenger-2.2.11/ext/apache2/ApplicationPoolServerExecutable 0 /var/li
root      7174  0.0  0.3  59560 10388 ?        Sl   14:01   0:31 Passenger spawn server
www-data  7417  0.0  0.2 188372  7552 ?        S    16:54   0:00 /usr/sbin/apache2 -k start
www-data  7952  0.0  0.2 188348  7536 ?        S    18:39   0:00 /usr/sbin/apache2 -k start
www-data  7956  0.0  0.2 188372  7556 ?        S    18:40   0:00 /usr/sbin/apache2 -k start
www-data  8327  0.0  0.2 188364  7664 ?        S    19:04   0:00 /usr/sbin/apache2 -k start
www-data  8430  0.0  0.2 188364  7328 ?        S    20:51   0:00 /usr/sbin/apache2 -k start
www-data  8448  0.0  0.2 188372  7336 ?        S    21:13   0:00 /usr/sbin/apache2 -k start
root      8491  0.0  0.0  70604  3188 ?        Ss   23:07   0:00 sshd: daniel [priv]
daniel    8562  0.0  0.0  70604  1624 ?        S    23:07   0:00 sshd: daniel@pts/0
daniel    8563  0.0  0.1  21548  4388 pts/0    Ss   23:07   0:01 -bash
root      8738  0.0  0.0      0     0 ?        S    23:27   0:00 [flush-251:0]
www-data  9429  0.0  0.2 187900  7040 ?        S    23:37   0:00 /usr/sbin/apache2 -k start
www-data  9430  0.0  0.2 188344  7352 ?        S    23:37   0:00 /usr/sbin/apache2 -k start
www-data  9448  0.0  0.2 188364  7344 ?        S    23:38   0:00 /usr/sbin/apache2 -k start
www-data  9489  0.0  0.2 187900  6988 ?        S    23:39   0:00 /usr/sbin/apache2 -k start
daniel    9531  0.0  0.0  15248  1204 pts/0    R+   23:45   0:00 ps aux
daniel@Mustrum:~/public_html/logs$

I'm guessing the useful ones are:
root 7173 0.0 0.0 89304 2104 ? Sl 14:01 0:00 /var/lib/gems/1.8/gems/passenger-2.2.11/ext/apache2/ApplicationPoolServerExecutable 0 /var/li
root 7174 0.0 0.3 59560 10388 ? Sl 14:01 0:31 Passenger spawn server

which are both root

I'm confused as what to do next.

Thank you for your help, you've been really insightful.

RE: Uploading files/documents fails - Added by Felix Schäfer almost 14 years ago

Nearly. The 2 processes you mention are part of the passenger stack but are not the ones that will be spawned as possibly another user. Make a request to redmine and try again to find the "Rails" process, anything else is pretty much moot at this point.

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

I've also found the following in /var/log/apache2/error.log

[Sat May 22 18:36:30 2010] [error] [client 124.148.239.91] Symbolic link not allowed or link target not accessible: /home/daniel/public_html/production.txt
Rails Error: Unable to access log file. Please ensure that /usr/share/redmine/log/production.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
Errno::EACCES (Permission denied - /usr/share/redmine/files/100522230915_s.jpg):
  app/models/attachment.rb:79:in `initialize'
  app/models/attachment.rb:79:in `open'
  app/models/attachment.rb:79:in `before_save'
  app/controllers/application_controller.rb:241:in `attach_files'
  app/controllers/application_controller.rb:238:in `each_value'
  app/controllers/application_controller.rb:238:in `attach_files'
  app/controllers/projects_controller.rb:272:in `add_file'
  passenger (2.2.11) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.11) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/utils.rb:184:in `safe_fork'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

I ran chmod 0666 production.log and then tried to upload again

production.log has this appended to it:

Processing ProjectsController#list_files (for 124.148.239.91 at 2010-05-23 00:00:45) [GET]
  Parameters: {"action"=>"list_files", "id"=>"thegame", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/list_files
Completed in 671ms (View: 443, DB: 42) | 200 OK [http://203.161.82.143/redmine/projects/thegame/files]

Processing ProjectsController#add_file (for 124.148.239.91 at 2010-05-23 00:00:51) [GET]
  Parameters: {"action"=>"add_file", "id"=>"thegame", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/add_file
Completed in 168ms (View: 113, DB: 4) | 200 OK [http://203.161.82.143/redmine/projects/thegame/files/new]

Processing ProjectsController#add_file (for 124.148.239.91 at 2010-05-23 00:01:01) [POST]
  Parameters: {"commit"=>"Add", "action"=>"add_file", "authenticity_token"=>"HYPePdo1JjcPdtn1yyOrScn7ilML+uo1u4hlwhRvkr0=", "id"=>"thegame", "controller"=>"projects", "attachments"=>{"1"=>{"file"=>#<File:/tmp/RackMultipart20100523-9580-700117-0>, "description"=>"kjlklj"}}}

Errno::EACCES (Permission denied - /usr/share/redmine/files/100523000101_s.jpg):
  app/models/attachment.rb:79:in `initialize'
  app/models/attachment.rb:79:in `open'
  app/models/attachment.rb:79:in `before_save'
  app/controllers/application_controller.rb:241:in `attach_files'
  app/controllers/application_controller.rb:238:in `each_value'
  app/controllers/application_controller.rb:238:in `attach_files'
  app/controllers/projects_controller.rb:272:in `add_file'
  passenger (2.2.11) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.11) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/utils.rb:184:in `safe_fork'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.11) lib/phusion_passenger/railz/application_spawner.rb:213:in `start'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.11) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.11) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

But I still get the upload error

So the logging works now, just upload doesn't. This "Errno::EACCES (Permission denied - /usr/share/redmine/files/100523000101_s.jpg):" seems to be the problem

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

I caught this using ps aux:

daniel 9576 1.4 2.6 171948 89120 ? S 00:00 0:09 Passenger ApplicationSpawner: /usr/share/redmine
daniel 9820 32.5 2.6 171960 87660 ? S 00:10 0:00 Rails: /usr/share/redmine

RE: Uploading files/documents fails - Added by Felix Schäfer almost 14 years ago

Yes, I'm still trying to get you to find the user your rails process is running as :-)

Ok, other idea: rename redmine_dir/log/production.log to something else and change the permissions of redmine_dir/log (the directory) to 777, that way the process will be able to recreate production.log and you will be able to see what user it belongs to. Be sure to reload your apache after changing the permissions.

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

chown'ing redmine/files to daniel fixes it, but I don't want daniel to control redmine. How do I change who runs redmine?

RE: Uploading files/documents fails - Added by Felix Schäfer almost 14 years ago

Ah, then your rails process is running as the user "daniel" because of passenger switching users. The details are here http://www.modrails.com/documentation/Users%20guide%20Apache.html#user_switching, but in the end: redmine_dir/config/environment.rb belongs to daniel, so the process runs as daniel. Change all the directory permissions from the list of directories redmine needs write access to to that user and it should all fly.

RE: Uploading files/documents fails - Added by Felix Schäfer almost 14 years ago

Daniel S wrote:

chown'ing redmine/files to daniel fixes it, but I don't want daniel to control redmine. How do I change who runs redmine?

Have a look at the documentation, the easiest would certainly to force passenger to switch to another user of your choice in your vhost configuration.

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

Felix Schäfer wrote:

Ok, other idea: rename redmine_dir/log/production.log to something else and change the permissions of redmine_dir/log (the directory) to 777, that way the process will be able to recreate production.log and you will be able to see what user it belongs to. Be sure to reload your apache after changing the permissions.

I did that, and the new production.log belongs to daniel

Thanks again for your help in this, I think we've nearly got it

RE: Uploading files/documents fails - Added by Daniel S almost 14 years ago

Ah perfect, I fixed it all by changing ownership from daniel to www-data for everything in /usr/var/redmine

Thank you so much for your help.

Daniel

RE: Uploading files/documents fails - Added by Nick Bolton over 13 years ago

FYI, you don't need to chown your entire redmine directory. This might not be such a good idea in terms of security. The most elegant way to fix this problem is to run:

chown www-data. config/environment.rb

This is because of how user switching works in Passenger:

A Rails application is started as the owner of the file config/environment.rb, and a Rack application is started as the owner of the file config.ru. So if /home/webapps/foo/config/environment.rb is owned by joe, then Phusion Passenger will launch the corresponding Rails application as joe as well.

RE: Uploading files/documents fails - Added by Sumeet Pareek about 11 years ago

Felix Schäfer wrote:

Happy to help :-)

A super BIG thank you hug to both Felix and Daniel. I was having the same problem and this thread not just helped me fix it, it also helped me learn how Rails+Passenger works :-)

I had the following recommended setup before the error was fixed -
  1. everything /usr/share/redmine owned by a user called 'admin' (which is my login)
  2. the dirs tmp,log,files,public/plugin_assets owned by www-data
  3. my production.log and this user switching doc helped me figure that my rails app started running from user www-data and switched to user admin, and the user admin not having access to cache directory inside tmp was the root cause

I wanted the app to run as use www-data all the time, and so I chown-ed the file config.ru to www-data too (along with other things listed in my 2nd point). This solved everything for me :-)

Hope this helps more people in the future.

Felix Schäfer, Daniel: Thanks again.

RE: Uploading files/documents fails - Added by Thiago Oliveira about 7 years ago

Guys,
I know that is an old topic but i cant figured out this permission problem. I got this:

down vote
favorite

My redmine works fine. But, the e-mail notification is not working.

Im using:

Environment:
Redmine version 3.0.3.stable
Ruby version 2.2.2-p95 (2015-04-13) [x86_64-linux]
Rails version 4.2.1
Environment production
Database adapter Mysql2
SCM:
Filesystem
Redmine plugins:
no plugin installed

configuration.yml:

default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
    address: "smtp.bsservices.com.br" 
    port: 587
    domain: "smtp.bsservices.com.br" 
    authentication: :login
    user_name: '<user>@bsservices.com.br'
    password: '<password>'
    openssl_verify_mode: 'none'

Error:

    (Permission denied - connect(2) for "smtp.bsservices.com.br" port 587)

Error 2:

    App 6529 stderr: Saving attachment '/var/www/redmine/files/2016/12/161223114939_app_creator.PNG' (79469 bytes) App 6529 stderr: Completed 500 Internal Server Error in 18ms (ActiveRecord: 2.5ms) App 6529 stderr: App 6529 stderr: Errno::EACCES (Permission denied @ rb_sysopen - /var/www/redmine/files/2016/12/161223114939_app_creator.PNG): App 6529 stderr: app/models/attachment.rb:109:in initialize'
      App 6529 stderr:   app/models/attachment.rb:109:inopen' App 6529 stderr: app/models/attachment.rb:109:in files_to_final_location'
      App 6529 stderr:   app/controllers/attachments_controller.rb:90:inupload'

I already gave all permissions (777) to the folder.

Any help?

    (1-21/21)