[DRE-maint] Bug#691739: bundler: Files installed via sudo must be chmodded and chowned
Reuben Thomas
rrt at sc3d.org
Mon Oct 29 10:34:53 UTC 2012
Package: bundler
Version: 1.2.1-1
Severity: normal
When I run "bundle install" as a normal user, targetted at the system
directory, it correctly installs files using sudo, but does not take
into account that my user's umask is 0027. Apparently, the files are
simply moved:
/var/lib/gems/1.9.1/cache:
total 240K
-rw-r----- 1 rrt rrt 89K Oct 29 10:30 addressable-2.3.2.gem
-rw-r----- 1 rrt rrt 35K Oct 29 10:30 crack-0.3.1.gem
-rw-r----- 1 rrt rrt 109K Oct 29 10:30 rake-0.9.2.2.gem
Thus they are owned by my user (which is surely wrong).
Worse for me, directories seem to be correctly owned, but still have
my umask:
/var/lib/gems/1.9.1/gems:
total 4.0K
drwxr-x--- 7 root root 4.0K Oct 29 10:30 addressable-2.3.2/
which means that I cannot read gems that I have installed, and a
typical "bundle install" command fails as follows:
$ bundle install
Fetching gem metadata from http://rubygems.org/........
Fetching gem metadata from http://rubygems.org/..
Using rake (0.9.2.2)
Installing addressable (2.3.2)
Installing crack (0.3.1)
Errno::EACCES: Permission denied - /var/lib/gems/1.9.1/specifications/addressable-2.3.2.gemspec
An error occurred while installing crack (0.3.1), and Bundler cannot continue.
Make sure that `gem install crack -v '0.3.1'` succeeds before bundling.
Note that I have sudo set up to override my umask with the default
(0022), so that using e.g. /usr/bin/install to install a file works
fine (for example, "sudo make install" in a GNU autotools-generated
build system does the right thing).
-- System Information:
Debian Release: wheezy/sid
APT prefers quantal-updates
APT policy: (500, 'quantal-updates'), (500, 'quantal-security'), (500, 'quantal')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.5.0-17-generic (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages bundler depends on:
ii ruby1.8 [ruby-interpreter] 1.8.7.358-4ubuntu0.1
ii ruby1.9.1 [ruby-interpreter] 1.9.3.194-1ubuntu1.2
Versions of packages bundler recommends:
ii build-essential 11.5ubuntu3
ii less 444-4ubuntu1
ii ruby1.8-dev [ruby-dev] 1.8.7.358-4ubuntu0.1
ii rubygems-integration 1.1
ii sudo 1.8.5p2-1ubuntu1
bundler suggests no packages.
-- no debconf information
More information about the Pkg-ruby-extras-maintainers
mailing list