G5 / storext

Add type-casting and other features on top of ActiveRecord::Store.store_accessor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3.0.0 File permissions issue

nedcampion opened this issue · comments

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

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

@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?

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