Project

General

Profile

Actions

Bug #10116

closed

gem with extension but without lib dir gets installed with a lib dir with wrong permissions

Added by robertgrimm (Robert Grimm) almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.2p95 (2014-05-08 revision 45877) [amd64-freebsd10]
[ruby-core:64232]

Description

When installing a ruby gem that has a C extension but not an explicit lib directory, the created lib directory will have a lib directory that's only readable by root causing non-root users to not be able to load the gem. That is, the permissions will be 700 instead of 755. The bug appears to be in Gem::Ext::ExtConfBuilder.build. A tmp directory is created, that might have 700 permissions. If the "destent" (lib) doesn't exist, it will rename the tmp directory to "desent" without altering its permissions.

An example gem that exhibits this behavior is the "absolute_time" gem (https://rubygems.org/gems/absolute_time). I've only tried this on FreeBSD. When using RVM on OSX at least, the permissions are correct.

Actions

Also available in: Atom PDF

Like0
Like0Like0