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

bootsnap compile-cache-yaml folder contents file permissions issue #439

Closed
aashish opened this issue Mar 28, 2023 · 4 comments
Closed

bootsnap compile-cache-yaml folder contents file permissions issue #439

aashish opened this issue Mar 28, 2023 · 4 comments

Comments

@aashish
Copy link

aashish commented Mar 28, 2023

Only on an env have issue cap deploy:cleanup of old releases and compile-cache-yaml folder contents. cap deploy using userdevelop role. But on another host for same app the compile-cache-yaml folder have different permissions so cap deploy:cleanup
works.

  Keeping 1 of 3 deployed releases on xxxxxxx.xx.xx
  01 rm -rf /projects/rails_app/releases/20230328063453 /opt/hrX/exchange/arn/releases/20230328054807 || true
  01 rm: cannot remove '/projects/rails_app/releases/20230328063453/tmp/cache/bootsnap/compile-cache-yaml/90/a3a53b8e7d9ffd': Permission denied
  01 rm: cannot remove '/projects/rails_app/releases/20230328063453/tmp/cache/bootsnap/compile-cache-yaml/9e/750ea4ead188ad': Permission denied
  01 rm: cannot remove '/projects/rails_app/releases/20230328063453/tmp/cache/bootsnap/compile-cache-yaml/be/ce1af921385c5d': Permission denied
  01 rm: cannot remove '/projects/rails_app/releases/20230328063453/tmp/cache/bootsnap/compile-cache-yaml/e0/09122

file permissions with 755

userdevelop@hostname:~> ll /projects/rails_app/releases/20230328054807/tmp/cache/bootsnap/compile-cache-yaml/
total 116
drwxr-xr-x 2 useradmin hrx 4096 Mar 28 07:50 00
drwxr-xr-x 2 useradmin hrx 4096 Mar 28 07:50 04
drwxr-xr-x 2 useradmin hrx 4096 Mar 28 07:50 07
drwxr-xr-x 2 useradmin hrx 4096 Mar 28 07:50 0e

But on for app on different host, the permissions are 775, so the cap deploy works.

userdevelop@hostnam2:~> ll /projects/rails_app/releases/20230322151328/tmp/cache/bootsnap/compile-cache-yaml/
total 116
drwxrwxr-x 2 userdmin hrx 4096 Mar 22 16:16 07
drwxrwxr-x 2 useradmin hrx 4096 Mar 22 16:16 0d
drwxrwxr-x 2 useradmin hrx 4096 Mar 22 16:16 14

Can you please suggest anything.

Thank you!!

@casperisfine
Copy link
Contributor

Are you using the latest bootsnap on both? There was a permission issue in early 1.4.x.

@aashish
Copy link
Author

aashish commented Mar 28, 2023

Yes, having v1.4.2 on rails_app on both hosts

/project/rails_app/current/Gemfile:gem 'bootsnap', '>= 1.4.2', require: false
/projects/rails_app/current/Gemfile.lock:    bootsnap (1.13.0)
/projects/rails_app/current/Gemfile.lock:  bootsnap (>= 1.4.2)

@aashish
Copy link
Author

aashish commented Mar 28, 2023

@burke can you please check

@casperisfine
Copy link
Contributor

You issue was fixed in 1.4.3 https://github.com/Shopify/bootsnap/blob/main/CHANGELOG.md#143. Just upgrade.

Also please refrain from pinging people on your issues like this, it's rude.

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