Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow all users access to packaged files in gem #38

Closed
varac opened this issue Dec 21, 2017 · 3 comments
Closed

Allow all users access to packaged files in gem #38

varac opened this issue Dec 21, 2017 · 3 comments

Comments

@varac
Copy link

varac commented Dec 21, 2017

After updating to 0.4.3, I found that files inside the gem have too restricted permissions:

# ls -al vendor/ruby/2.1.0/gems/puppet-catalog-test-0.4.3/
total 36
drwxr-xr-x  4 root root 4096 Dec 21 09:12 .
drwxr-xr-x 58 root root 4096 Dec 21 09:12 ..
drwxr-xr-x  2 root root 4096 Dec 21 09:12 bin
drwxr-xr-x  3 root root 4096 Dec 21 09:12 lib
-rw-r--r--  1 root root 1058 Dec 21 09:12 LICENSE
-rw-------  1 root root  716 Dec 21 09:12 puppet-catalog-test.gemspec
-rw-------  1 root root 2751 Dec 21 09:12 Rakefile
-rw-------  1 root root 7477 Dec 21 09:12 README.md

This breaks setups where bundled gems are installed by root but accessed by an unprivileged user.

Please relax the permissions.

@invadersmustdie
Copy link
Owner

damn :/ Sorry for that .. I've uploaded 0.4.4 with fixed permissions. Could you do me the favour and verify this issue on your side?

hubot pushed a commit to leapcode/leap_platform that referenced this issue Dec 21, 2017
Installing gems as user root and accessing them as
unprivileged user breaks with gems that ship files
with too restrictive file permissions.

See invadersmustdie/puppet-catalog-test#38
@varac
Copy link
Author

varac commented Dec 21, 2017

@invadersmustdie Sorry, I don't have the time at the moment.

@invadersmustdie
Copy link
Owner

No worries, I've verified this on another box.

  1. Install gem as root
  2. require + test as user

Works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants