CDRH / sparc

Salmon Pueblo Archaeological Research Collection (SPARC) Rails Site
https://salmonpueblo.org/
0 stars 0 forks source link

Issue updating to rails 5.1.x #375

Open jduss4 opened 5 years ago

jduss4 commented 5 years ago

Working on branch "update" and running into trouble bumping rails to 5.1.

bundle exec rails app:update

Runs for a while and replaces / removes files until:

rails aborted!
Errno::EPERM: Operation not permitted @ apply2files - /var/local/www/rails/salmonpueblo.org/bin
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/thor-0.20.3/lib/thor/actions/file_manipulation.rb:154:in `chmod'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/generators/rails/app/app_generator.rb:17:in `chmod'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/generators/rails/app/app_generator.rb:84:in `bin'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/generators/rails/app/app_generator.rb:90:in `bin_when_updating'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/generators/app_base.rb:151:in `build'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/generators/rails/app/app_generator.rb:267:in `update_bin_files'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/tasks/framework.rake:41:in `invoke_from_app_generator'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/tasks/framework.rake:66:in `block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/command.rb:46:in `invoke'
/usr/local/rvm/gems/ruby-2.5.0@sparc/gems/railties-5.1.6.1/lib/rails/commands.rb:16:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => app:update => app:update:bin

It doesn't seem like it's a file permissions issue. Not sure if it could be SELinux restricting the ability to manipulate bin directory? Any thoughts, @techgique ? Looks like the directory and contents are unconfied_u:object_r:httpd_sys_content_t

jduss4 commented 5 years ago

I guess it's possible that I would have to run the command as a root user in order to execute chmod on files I don't own, but it seems.....real weird

techgique commented 5 years ago

Definitely looks like a file or SELinux permission issue. Let me know when you have a few minutes to try again and we can look at this together