Gem's installed from github setting incorrect permissions on bin files
Reported by Josh Knowles | June 23rd, 2008 @ 08:13 PM
Gems I've installed from github, using gem version 1.2, appear to be setting the files in the bin directory to mode 733, which doesn't allow my regular user account to be able to execute it.
Some example gems that this has happened on include wycats-thor, wycats-textmate and defunkt-github. Note that I assume its a github problem, as opposed to a gems problem as the equivalent thor on rubyforge did not have this problem, but I could be mistaken.
Comments and changes to this ticket
-
Chris June 24th, 2008 @ 05:25 AM
Same with my installation too (Mac OS X 10.5.3, gem 1.2).
Changing permissions allows such gem binaries to run.
webmat-git_remote_branch is similarly affected.
-

madrona June 25th, 2008 @ 10:44 PM
- → Tag changed from to bug gem
I seem to have run into the same issue with two files in the madrona-rad gem that are changed to 623
-rw--w--wx 1 root wheel 4844 Jun 25 22:30 SWSerLCDpa.cpp
-rw--w--wx 1 root wheel 1803 Jun 25 22:30 SWSerLCDpa.h
files are located in lib/libraries/SWSerLCDpa
(Mac OS X 10.5.3, gem 1.2.0):
-

madrona June 25th, 2008 @ 11:13 PM
update: the original permissions on the two files above were 755. When I changed these to 644, they were changed to 444 (normal?) and in gem install worked fine.
-

-
Eric Mill June 30th, 2008 @ 08:49 AM
This is affecting me as well. My binary starts in my repository as 755, gets installed as 733, and attempts to run it fail. Once installed, modifying the permissions on the binary in $GEM_PATH/gems/[gem_name]/bin/[binary] fixes the issue.
-
Eric Mill June 30th, 2008 @ 08:51 AM
Oh, and I'm on Ubuntu, as well, so this is not just an OS X issue.
-
Tammer Saleh July 1st, 2008 @ 07:18 AM
Can someone verify that this is a github problem, and not a problem with the latest rubygems? Josh thinks he's verified, but a confirmation would be good.
-
Eric Mill July 1st, 2008 @ 12:57 PM
Yeah, I can confirm this. My gem is also hosted on Rubyforge under a different name, and installing it from Rubyforge works fine.
I also tried building the gem myself using Rubygems 1.2, using "gem build basecamper.gemspec", then unpacked it with Rubygems 1.2, and the file permissions on the binary were 755, which is what it was to begin with. Github seems to build gems whose binaries get set to 733.
-
Eric Mill July 2nd, 2008 @ 07:23 AM
- → Assigned user changed from to PJ Hyett
To me this seems like a high priority bug, for github as well as me, since it's also blocking the main github gem ('defunkt-github') from working. I'm going to assume that since we can use the "Who's responsible?" dropdown, it's okay for us to do so.
-
Matt Lyon July 5th, 2008 @ 04:16 AM
I'm seeing this problem as well in "mattly-generate_nginx_config". When I build and install locally, permissions are set fine, installing from github the binfiles are 733.
-
-
PJ Hyett July 10th, 2008 @ 04:33 PM
I've pushed a possible fix for this, could you guys report back if it works correctly or not?
-
Matt Lyon July 10th, 2008 @ 05:06 PM
my gem has built and is available now, has been since you pinged me on irc a few days ago.
-
PJ Hyett July 10th, 2008 @ 05:08 PM
Hey Matt,
There's still a handful of people with permissions issues, just checking to see if the last push fixed it for them.
-PJ
-
Eric Mill July 10th, 2008 @ 07:42 PM
My gem (basecamper) is still not working, but that's probably because it hasn't been rebuilt? Could you do that manually, or do you need to me commit a change to the gemspec?
-

Adam Meehan July 10th, 2008 @ 10:42 PM
My gem adzap-ar_mailer is also not working. Same permissions problem.
-
PJ Hyett July 11th, 2008 @ 10:24 AM
Sorry, to be clear, everyone with permissions issue will have to rebuild their gem to see if it's fixed.
-
Brendan Baldwin July 11th, 2008 @ 12:59 PM
It didn't fix it for my gem. It rebuilt this afternoon sometime around 2pm CST and now it looks like this:
-rws-wx-wx 1 root admin 3233 Jul 11 14:57 skynet
-rws-wx-wx 1 root admin 1657 Jul 11 14:57 skynet_install
-rws-wx-wx 1 root admin 2445 Jul 11 14:57 skynet_tuplespace_server
-
Brendan Baldwin July 14th, 2008 @ 08:00 AM
Still happening for me. Just updated gemspecs and downloaded new gem build and...
-rws-wx-wx 1 root admin 3233 Jul 14 09:58 skynet
-rws-wx-wx 1 root admin 1657 Jul 14 09:58 skynet_install
-rws-wx-wx 1 root admin 2445 Jul 14 09:58 skynet_tuplespace_server
-
Brendan Baldwin July 14th, 2008 @ 05:11 PM
hmm-- this is a new one...
$ gem list --remote --source http://gems.github.com | grep brendan-skynet
brendan-skynet (0.9.312)
$ gem install --source http://gems.github.com brendan-skynet
ERROR: could not find gem brendan-skynet locally or in a repository
?
-
Eric Mill July 15th, 2008 @ 12:04 PM
PJ - I modified and committed the gemspec and given it some time, and a gem install still produces the same issues for me.
-

Adam Meehan July 15th, 2008 @ 05:56 PM
PJ - Committed an update to the gem which was a version change. Issue persists.
-
arilerner (at mac) July 17th, 2008 @ 07:02 PM
I continue to get this error as well.
sudo gem install auser-poolparty
... (long) install message ...
Successfully installed auser-poolparty-0.1.1
pool master > pool -V
/usr/bin/pool:19:in `load': no such file to load -- pool (LoadError)
from /usr/bin/pool:19
Any ideas? The gem works when building with
"gem build" and installs and works just fine through "rake manifest gem install"
It would be super if we could get this working... thank you!
-
arilerner (at mac) July 17th, 2008 @ 07:04 PM
Okay. Update:
When I changed the binary to be 755, I can access it through the commandline.
Ideas?
-
S. Brent Faulkner July 17th, 2008 @ 07:28 PM
I chmod'ed my local bin file to 644 and updated the version in my gemspec. After that I committed and pushed.
After the gem was rebuilt and I installed it the permissions were fine... a bit contrary to intuition that I didn't set it excutable in my package source, but it worked.
Cheers.
-

Adam Meehan July 17th, 2008 @ 07:29 PM
Confirmin Brendans problem with GitHub gems not being found by RubyGems anymore.
The tip I gave users on my blog was running this
GEMS_PATH=`gem env path`
GEM_NAME='adzap-ar_mailer'
sudo chmod 755 $GEMS_PATH/gems/$GEM_NAME*/bin/*
Fixes the problem for now a bit more easily.
-

Adam Meehan July 17th, 2008 @ 07:32 PM
Ok gem found now, ignore me. Now to try S. Brent Faulkners tip.
-
PJ Hyett July 25th, 2008 @ 12:18 AM
Code was pushed out tonight that should once and for all fix the permission bugs. Could someone with this issue try building their gem again?
-
-
S. Brent Faulkner July 25th, 2008 @ 05:23 AM
Tried this morning, but unfortunately it looks like [#661] is happening and my gem is not regenerating and the new version is still not available (after about 20 minutes).
When it regenerates, I'll let you know.
-
Eric Mill July 25th, 2008 @ 09:19 AM
Mine is also not regenerating. I updated the gemspec to be version 1.0.3, but:
$ gem list --remote | grep Klondike
Klondike-basecamper (1.0.2)
-

-
PJ Hyett July 29th, 2008 @ 01:15 AM
Ironically, I introduced a bug preventing the gem builder from working in an attempt to fix the permissions bug.
Both should be fixed now, so please try building your gems again.
-
S. Brent Faulkner July 29th, 2008 @ 05:29 AM
I waited over half an hour in the hope that it was just slow, but I updated and committed (and pushed) my gemspec and it is still not regenerating (sbfaulkner-rsql)
-

-
PJ Hyett July 29th, 2008 @ 10:41 AM
I spotted another bug and just successfully build the madrona-rad gem, so every one should be able to build gems now.
-
S. Brent Faulkner July 29th, 2008 @ 11:16 AM
I'm doing my happy dance now (and I'm really glad none of you can see it)!
Thanks, PJ. You appear to have put a nail in both coffins.
My gem has regenerated and the permissions are correct on the bin (I did a full uninstall first to make sure).
Cheers.
--Brent
-

madrona July 29th, 2008 @ 11:28 AM
I am ready to do a happy dance, but..... after sudo gem uninstall madrona-rad then sudo gem install madrona rad I still have a very old version .. check the gemspec summary: 0.2.4.5.9 while the current number is 0.2.4.9.1 Am I missing something?
current gemspec: http://github.com/madrona/rad/tr...
thanks,
jd
-
S. Brent Faulkner July 29th, 2008 @ 11:56 AM
My guess would be that it's because your version number goes beyond x.y.z (ie. more than 3 parts)
If you check out the rubygems documentation (http://www.rubygems.org/read/cha... they strongly recommend major.minor.build format.
Cheers.
-
S. Brent Faulkner July 29th, 2008 @ 12:07 PM
sorry, I made that guess based on the message text referring to version 0.2.4.5.9 without actually looking at the gemspec (where I now see that the actual version is simply 0.2.4)
-
Kenneth Lee July 30th, 2008 @ 03:38 AM
Just an update from #661 which was marked as a duplicate, my gem was successfully updated just a few minutes from updating the gemspec file. Great work!
-
-
S. Brent Faulkner July 30th, 2008 @ 01:27 PM
based on the problem that jd/madrona continues to experience I did a small test.
I committed and pushed a change to my gemspec without updating the version.
This causes the problem described... so it appears that gems are being regenerated, but only if the version changes.
This works for me, but according to the troubleshooting instructions on the site (http://gems.github.com) it should "... build a new version of the gem or rebuild an existing version of the gem based upon the version you set in your gemspec."
Cheers.
-
PJ Hyett July 30th, 2008 @ 02:26 PM
I appreciate your investigation Brent, because it made me realize I wasn't using the FileUtils library correctly.
Thus, gems of the same version will actually rebuild now!!
-
S. Brent Faulkner July 30th, 2008 @ 09:36 PM
Glad I could help! Everything seems to work for me now.
Hopefully everyone else can corroborate my findings.
-

Adam Meehan July 30th, 2008 @ 10:19 PM
Working now. RubyGems doesn't seem to overwrite a gem's binary file if you're installing the same version. Had to uninstall and reinstall.
Thanks getting it fixed.
-
grobie July 30th, 2008 @ 10:24 PM
I've got this error, if I try to install defunkt-github: no such file to load -- github (LoadError)
-
grobie July 30th, 2008 @ 10:24 PM
I've got this error, if I try to install defunkt-github: no such file to load -- github (LoadError)
-
Eric Mill July 31st, 2008 @ 09:08 AM
The defunkt-github gemspec was last updated on July 24, so it probably needs to be regenerated again to see the benefits of this fix.
-

-
PJ Hyett August 7th, 2008 @ 09:12 PM
- → State changed from open to resolved
Closing this since I have no idea what's working and what isn't, please open up a new ticket if you still are having issues.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
