Project

General

Profile

Redmine can't write to own directories

Added by Mant1kor R about 5 years ago

Hi!
It looks like simple, but I can't fix the problem.
I've installed a new Redmine 4 on CentOS 7.7.
"Attachments directory writable" and "Plugin assets directory writable" shows problem.
Redmine don't write anything to log file.

SELinux = Disabled

Environment:
  Redmine version                4.0.4.stable
  Ruby version                   2.6.3-p62 (2019-04-16) [x86_64-linux]
  Rails version                  5.2.3
  Environment                    production
  Database adapter               PostgreSQL

I already set correct permissions to the files:

chown -R redmine:redmine files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets
find files log tmp public/plugin_assets -type f -exec chmod -x {} +

drwxr-xr-x  2 redmine redmine   23 Jun 10 15:53 files
drwxr-xr-x  2 redmine redmine   28 Oct 10 18:41 log
drwxr-xr-x 10 redmine redmine  118 Oct 10 18:24 tmp
drwxr-xr-x  2 redmine redmine   19 Jun 10 15:53 plugin_assets

Nginx compiled with Passenger module and ran with parameter: user redmine;

What I missed?


Replies (2)

RE: Redmine can't write to own directories - Added by Mant1kor R about 5 years ago

Problem was: Passenger don't have access to redmine dirs. I don't know why.
Solved the problem by install Redmine follow another instruction.

RE: Redmine can't write to own directories - Added by Go MAEDA about 5 years ago

I think changing the owner of config.ru file should have resolved the problem.

chown redmine:redmine config.ru

When you use Passenger as an application server, Redmine runs under the same user and group as the owner of config.ru file. Please refer to https://www.phusionpassenger.com/library/deploy/apache/user_sandboxing.html#when-is-user-account-sandboxing-enabled for further details.

    (1-2/2)