Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

File permissions cause LoadError #54

Closed
blowmage opened this issue Jan 20, 2017 · 6 comments
Closed

File permissions cause LoadError #54

blowmage opened this issue Jan 20, 2017 · 6 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@blowmage
Copy link
Contributor

blowmage commented Jan 20, 2017

Hi, the google-cloud-ruby project has a couple of reports of LoadError when requiring "google/gax". (See googleapis/google-cloud-ruby#1193 and googleapis/google-cloud-ruby#1194) The cause for this is that the gems are packaged with files using 640 permissions, where 664 or 644 permissions are expected.

A very common production scenario for Ruby applications is to have a deploy user install the application and all dependent libraries, and an app user account run the application. Because of how the google-gax file permissions are set, it is entirely possible that the app user cannot read the files, and a LoadError is raised.

Here are the permissions for google-gax 0.6.0:

├── [-rw-r-----]  README.md
├── [-rw-r-----]  Rakefile
├── [drwxr-xr-x]  lib
│   └── [drwxr-xr-x]  google
│       ├── [drwxr-xr-x]  gax
│       │   ├── [-rw-r-----]  api_callable.rb
│       │   ├── [-rw-r-----]  bundling.rb
│       │   ├── [-rw-r-----]  errors.rb
│       │   ├── [-rw-r-----]  grpc.rb
│       │   ├── [-rw-r-----]  path_template.rb
│       │   ├── [-rw-r-----]  settings.rb
│       │   └── [-rw-r-----]  version.rb
│       ├── [-rw-r-----]  gax.rb
│       └── [drwxr-xr-x]  longrunning
│           ├── [-rw-r-----]  operations_api.rb
│           └── [-rw-r-----]  operations_client_config.json
└── [drwxr-xr-x]  spec
    ├── [drwxr-xr-x]  google
    │   └── [drwxr-xr-x]  gax
    │       ├── [-rw-r-----]  api_callable_spec.rb
    │       ├── [-rw-r-----]  bundling_spec.rb
    │       ├── [-rw-r-----]  path_template_spec.rb
    │       └── [-rw-r-----]  settings_spec.rb
    └── [-rw-r-----]  spec_helper.rb

7 directories, 17 files

This problem also affects googleapis-common-protos, but I don't see a repo for that gem, so I'm mentioning it here.

@blowmage
Copy link
Contributor Author

Likely related to #42.

@blowmage
Copy link
Contributor Author

This problem does not affect any of the google-cloud-* gems, googleauth, google-protobuf, grpc, or grpc-google-iam-v1.

@blowmage
Copy link
Contributor Author

Here are the file permissions of the latest gem, 0.7.0:

├── [-rw-r--r--]  README.md
├── [-rw-r--r--]  Rakefile
├── [drwxr-xr-x]  lib
│   └── [drwxr-xr-x]  google
│       ├── [drwxr-xr-x]  gax
│       │   ├── [-rw-r--r--]  api_callable.rb
│       │   ├── [-rw-r--r--]  bundling.rb
│       │   ├── [-rw-r--r--]  constants.rb
│       │   ├── [-rw-r--r--]  errors.rb
│       │   ├── [-rw-r--r--]  grpc.rb
│       │   ├── [-rw-r--r--]  operation.rb
│       │   ├── [-rw-r--r--]  path_template.rb
│       │   ├── [-rw-r--r--]  settings.rb
│       │   └── [-rw-r--r--]  version.rb
│       ├── [-rw-r--r--]  gax.rb
│       └── [drwxr-xr-x]  longrunning
│           ├── [-rw-r--r--]  operations_client.rb
│           └── [-rw-r--r--]  operations_client_config.json
└── [drwxr-xr-x]  spec
    ├── [drwxr-xr-x]  google
    │   └── [drwxr-xr-x]  gax
    │       ├── [-rw-r--r--]  api_callable_spec.rb
    │       ├── [-rw-r--r--]  bundling_spec.rb
    │       ├── [-rw-r--r--]  operation_spec.rb
    │       ├── [-rw-r--r--]  path_template_spec.rb
    │       └── [-rw-r--r--]  settings_spec.rb
    └── [-rw-r--r--]  spec_helper.rb

7 directories, 20 files

This looks to be fixed so I will close this issue. We will move to the latest version as soon as we can. Thanks much!

@blowmage
Copy link
Contributor Author

The googleapis-common-protos gem still has not had a release that fixes the file permissions.

@blowmage
Copy link
Contributor Author

@swcloud This is the issue created for both google-gax and googleapis-common-protos.

@swcloud
Copy link
Contributor

swcloud commented Feb 16, 2017

@landrito

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants