File permission problem #11

Closed
morganchristiansson opened this Issue Mar 26, 2012 · 5 comments

Projects

None yet

2 participants

@morganchristiansson

After a standard install of the latest version most files are missing read permissions. This on a Ubuntu system.

morgan@morgan:/usr/local/rvm/gems/ruby-1.9.3-p0/gems/rspec-instafail-0.2.3$ find -ls
7250944    4 drwxr-sr-x   4 root     rvm          4096 Mar 26 12:17 .
7250945    4 drwxr-sr-x   3 root     rvm          4096 Mar 26 12:17 ./lib
7250946    4 drwxr-sr-x   3 root     rvm          4096 Mar 26 12:17 ./lib/rspec
7221756    4 -rw-------   1 root     rvm           429 Mar 26 12:17 ./lib/rspec/instafail.rb
7250947    4 drwxr-sr-x   2 root     rvm          4096 Mar 26 12:17 ./lib/rspec/instafail
7221757    4 -rw-------   1 root     rvm           240 Mar 26 12:17 ./lib/rspec/instafail/rspec_1.rb
7221759    4 -rw-------   1 root     rvm            62 Mar 26 12:17 ./lib/rspec/instafail/version.rb
7221758    4 -rw-------   1 root     rvm           979 Mar 26 12:17 ./lib/rspec/instafail/rspec_2.rb
7221760    4 -rw-------   1 root     rvm           404 Mar 26 12:17 ./rspec-instafail.gemspec
7221754    4 -rw-------   1 root     rvm           869 Mar 26 12:17 ./Rakefile
7250948    4 drwxr-sr-x   4 root     rvm          4096 Mar 26 12:17 ./spec
7250949    4 drwxr-sr-x   2 root     rvm          4096 Mar 26 12:17 ./spec/rspec_1
7221763    4 -rw-------   1 root     rvm           112 Mar 26 12:17 ./spec/rspec_1/Gemfile.lock
7221762    4 -rw-------   1 root     rvm            49 Mar 26 12:17 ./spec/rspec_1/Gemfile
7221764    4 -rw-------   1 root     rvm           648 Mar 26 12:17 ./spec/rspec_1/a_test.rb
7221761    4 -rw-------   1 root     rvm          1422 Mar 26 12:17 ./spec/instafail_spec.rb
7250950    4 drwxr-sr-x   2 root     rvm          4096 Mar 26 12:17 ./spec/rspec_2
7221766    4 -rw-------   1 root     rvm           329 Mar 26 12:17 ./spec/rspec_2/Gemfile.lock
7221765    4 -rw-------   1 root     rvm            50 Mar 26 12:17 ./spec/rspec_2/Gemfile
7221767    4 -rw-------   1 root     rvm           892 Mar 26 12:17 ./spec/rspec_2/a_test.rb
7221755    4 -rw-------   1 root     rvm          1869 Mar 26 12:17 ./Readme.md

This results in the following error:

/usr/local/rvm/gems/ruby-1.9.3-p0/gems/rspec-core-2.8.0/lib/rspec/core/configuration.rb:402:in `require': cannot load such file -- rspec/instafail (LoadError)

Why are the permissions wrong? (Perhaps they were wrong when you created & pushed the .gem file?)

@grosser
Owner
grosser commented Mar 26, 2012

Can you try to install another gem and list its permissions, just to make sure its not a odd problem on your system.
And maybe try to upgrade rubygems.

I have 700 permissions in this folder, but having the installed gems permission depend on the origin systems permission seems rather buggy <-> I would imagine rubygems to normalize the permissions.

@morganchristiansson

My machine is a Ubuntu desktop, I have confirmed it on my colleagues OS X macbook and on an ubuntu server.

It's problematic if you're installing gems as root, because you won't have read permissions to require the files. :-(

@grosser grosser closed this in 1c5d71d Mar 27, 2012
@grosser
Owner
grosser commented Mar 27, 2012

Please try 0.2.4, I hope it works,
still a very odd issue :(

@morganchristiansson

Yeah 0.2.4 is good! Thanks for the quick update.

$ ls -l $(gem contents rspec-instafail)
-rwxr-xr-x 1 root rvm  429 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/lib/rspec/instafail.rb
-rwxr-xr-x 1 root rvm  240 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/lib/rspec/instafail/rspec_1.rb
-rwxr-xr-x 1 root rvm  979 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/lib/rspec/instafail/rspec_2.rb
-rwxr-xr-x 1 root rvm   62 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/lib/rspec/instafail/version.rb
-rwxr-xr-x 1 root rvm  869 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/Rakefile
-rwxr-xr-x 1 root rvm 1869 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/Readme.md
-rwxr-xr-x 1 root rvm  404 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/rspec-instafail.gemspec
-rwxr-xr-x 1 root rvm 1422 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/spec/instafail_spec.rb
-rwxr-xr-x 1 root rvm  648 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/spec/rspec_1/a_test.rb
-rwxr-xr-x 1 root rvm   49 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/spec/rspec_1/Gemfile
-rwxr-xr-x 1 root rvm  112 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/spec/rspec_1/Gemfile.lock
-rwxr-xr-x 1 root rvm  892 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/spec/rspec_2/a_test.rb
-rwxr-xr-x 1 root rvm   50 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/spec/rspec_2/Gemfile
-rwxr-xr-x 1 root rvm  329 2012-03-27 16:26 /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rspec-instafail-0.2.4/spec/rspec_2/Gemfile.lock
@morganchristiansson

Although all files have the executable bit set now. Not really a problem, but at the same time it's not right to have executable readme files. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment