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

3.0.0 File permissions issue #62

Open
nedcampion opened this issue Jun 20, 2019 · 3 comments
Open

3.0.0 File permissions issue #62

nedcampion opened this issue Jun 20, 2019 · 3 comments

Comments

@nedcampion
Copy link

Hi there.

I just wanted to let you know that the 3.0.0 gem has some file permissions issues. All the files inside of the 3.0.0 gem have 600 permissions. This means that if you have an environment that installs the gems as one user and then runs your application as another the application won't be able to load the gem. This issue can also be tough to see coming too because people normally only develop locally with one user so it wouldn't be encountered until a deployment that uses two users.

We just got hit by this during a deployment. This is not an issue with the 2.2.2 gem.

Love the gem, very handy, thank you.

Screen Shot 2019-06-20 at 12 03 20 PM

@ramontayag
Copy link
Contributor

@nedcampion thanks for this. Wouldn't have caught this myself.

@ramontayag
Copy link
Contributor

@nedcampion what you listed there -- is that the installed gem? In the directory where I work on the gem, the permissions are 644. Could it be that rubygems is setting the permissions to 600 when you install it?

@nedcampion
Copy link
Author

Hey @ramontayag, sorry for the delay.

If you look at a gem directory where gem has installed 3.0.0 you'll see what I'm talking about, but I don't think it's gem that is doing this. I think the hosted version of your 3.0.0 gem is the source of the issue. You can confirm this by downloading the gem directory from ruby gems:

[Desktop]$ curl https://rubygems.org/downloads/storext-3.0.0.gem --output storext-3.0.0.gem
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7168  100  7168    0     0   127k      0 --:--:-- --:--:-- --:--:--  129k
[Desktop]$ gem unpack storext-3.0.0.gem 
Unpacked gem: '/Users/nedcampion/Desktop/storext-3.0.0'
[Desktop]$ ls -lrt storext-3.0.0/*
-rw-------  1 nedcampion  staff  1042 Jul 22 13:29 storext-3.0.0/MIT-LICENSE
-rw-------  1 nedcampion  staff   573 Jul 22 13:29 storext-3.0.0/Rakefile

storext-3.0.0/lib:
total 8
-rw-------  1 nedcampion  staff  1181 Jul 22 13:29 storext.rb
drwxr-xr-x  6 nedcampion  staff   192 Jul 22 13:29 storext
drwxr-xr-x  3 nedcampion  staff    96 Jul 22 13:29 tasks

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