• Andrew Lee (李健秋)'s avatar
    Update correct group permission for rb_sysopen · b62403bf
    Andrew Lee (李健秋) authored
    The rb_sysopen runs as www-data that needs to access to production.log,
    backend_access.log and database.yml.
    Revert the group owner to www-data to avoid following errors:
     Rails Error: Unable to access log file. Please ensure that
     /usr/share/obs/api/log/production.log exists and is writable (ie, make
     it writable for user and group: chmod 0664
     /usr/share/obs/api/log/production.log). The log level has been raised
     to WARN and the output directed to STDERR until the problem is fixed.
     rake aborted!
     Errno::EACCES: Cannot load `Rails.application.database_configuration`:
     Permission denied @ rb_sysopen - /usr/share/obs/api/config/database.yml
     /usr/share/obs/api/config/environment.rb:30:in `<top (required)>'
     Errno::EACCES: Permission denied @ rb_sysopen -
     /usr/share/obs/api/config/environment.rb:30:in `<top (required)>'
     Tasks: TOP => environment
     (See full trace by running task with --trace)
     Errno::EACCES: Permission denied @ rb_sysopen -
     /usr/share/obs/api/lib/opensuse/backend.rb:14:in `new'
     /usr/share/obs/api/lib/opensuse/backend.rb:14:in `<class:Backend>'
     /usr/share/obs/api/lib/opensuse/backend.rb:6:in `<module:Suse>'
     /usr/share/obs/api/lib/opensuse/backend.rb:5:in `<top (required)>'
     /usr/share/obs/api/app/models/project.rb:1:in `<top (required)>'
     /usr/share/obs/api/app/indices/project_index.rb:2:in `block in <top
     Tasks: TOP => ts:index
     (See full trace by running task with --trace)
    Signed-off-by: default avatarAndrew Lee (李健秋) <ajqlee@debian.org>
rake-tasks.sh 2.88 KB