[2.4.2]File repository not writable

Added by Francesco Stupazzoni almost 4 years ago

Hi

I've tried an install of 2.4.2:

sh: 1: svn: not found
sh: 1: darcs: not found
sh: 1: hg: not found
sh: 1: cvs: not found
sh: 1: bzr: not found
sh: 1: git: not found
Environment:
Redmine version 2.4.2.stable
Ruby version 1.9.3-p194 (2012-04-20) [x86_64-linux]
Rails version 3.2.16
Environment production
Database adapter Mysql2
SCM:
Filesystem
Redmine plugins:
no plugin installed

but when going on Administration, Information, it says file repository is not writable, while it should:

ls -ls /usr/share/redmine/

4 drwxrwxr-x 7 root root 4096 dic 23 09:48 app
4 drwxrwxr-x 5 root root 4096 gen 16 16:46 config
4 rw-rw-r- 1 root root 160 dic 23 09:48 config.ru
4 rw-rw-r- 1 root root 240 dic 23 09:48 CONTRIBUTING.md
4 drwxrwxr-x 3 root root 4096 gen 10 12:35 db
4 drwxrwxr-x 2 root root 4096 dic 23 09:48 doc
4 drwxrwxr-x 5 root root 4096 dic 23 09:48 extra
4 drwxrwxr-x 2 www-data www-data 4096 dic 23 09:48 files
4 rw-rw-r- 1 root root 3281 dic 23 09:48 Gemfile
4 rw-r--r- 1 root root 3379 gen 10 12:31 Gemfile.lock
4 drwxrwxr-x 8 root root 4096 dic 23 09:48 lib
4 drwxrwxr-x 2 www-data www-data 4096 gen 10 12:35 log
4 drwxrwxr-x 2 www-data www-data 4096 dic 23 09:48 plugins
4 drwxrwxr-x 8 root root 4096 gen 13 20:09 public
4 rw-rw-r- 1 root root 275 dic 23 09:48 Rakefile
4 rw-rw-r- 1 root root 205 dic 23 09:48 README.rdoc
4 drwxrwxr-x 2 root root 4096 dic 23 09:48 script
4 drwxrwxr-x 9 root root 4096 dic 23 09:48 test
4 drwxrwxr-x 9 www-data www-data 4096 gen 10 12:36 tmp
4 drwxrwxr-x 2 root root 4096 dic 23 09:48 vendor

[...]

4 rw-rw-r- 1 www-data www-data 36 dic 23 09:48 delete.me

Any hint?

Thanks

Replies (1)

RE: [2.4.2]File repository not writable - Added by Francesco Stupazzoni almost 4 years ago

I'll answer to myself:
ps auxf | grep redmine

gives:

nobody 3546 1.1 9.8 270444 101232 ? Sl 11:07 0:09 Passenger RackApp: /usr/share/redmine

So I did a

chown -R nobody:nogroup /usr/share/redmine/files
chown -R nobody:nogroup /usr/share/redmine/log
chown -R nobody:nogroup /usr/share/redmine/plugins
chown -R nobody:nogroup /usr/share/redmine/tmp
chown -R nobody:nogroup /usr/share/redmine/public/plugin_assets

and it works now.

The question is whether is it better to run passenger as nobody or as www-data.

See the other topic about it.

(1-1/1)