Comments (3)
At first read I took what you wrote as implying that 3.6 changed something which caused the issue, but this is in-fact just a discussion where changing capistrano to diverge from default rake DSL behavior resulted in adding a warning to inform users who's procedures attempted to rely on an incorrectly assumed behavior (such as this one does).
Apparently I never noticed in the output that the permissions reset was never run the 2nd time, and 3.6+ now throws a warning. So…sounds like a bug fix is in order. I've confirmed that it doesn't run twice currently in the older version to prove my reading of the issue thread correct ;)
Now what I'm trying to figure out…
a) is it necessary to apply the permissions reset after generation of code / static assets
b) can it be run once, but after the generation is complete vs before and after
The advantage of doing it after is clear: everything has proper permissions. Running it before may be strictly necessary in some edge cases. The goal of this command is to have it lock down permissions to only be as open as necessary for M2 to run in most environments. That would include (most likely) read only permissions for everyone but the owner on things like generated static assets and code files, as well as the vendor directory.
from capistrano-magento2.
@davidalger Yeah, you are right that the behavior wasn't introduced in 3.6, but rather a notification was added explaining the behavior. Thanks for catching that.
I know there was a reason my initial Cap scripts reset the permissions twice, but I had a somewhat unique Linux user setup that I've since moved away from. I tend to think option b should work without issues in a standard setup. If we drop the first permissions reset and it causes issues, it should cause an atomic failure of the deployment, so the risk of making this change is fairly low.
If you'd like, I can remove the first permissions reset locally and test for a while and then submit it as a PR if I don't see any issues.
from capistrano-magento2.
This issue has been resolved and will be fixed in the next tagged release (to be tagged shortly).
from capistrano-magento2.
Related Issues (20)
- Do not run show pending updates when capistrano is outside magento git repo HOT 1
- var/reports HOT 2
- Can't install 'capistrano/magento2/cachetool' HOT 2
- [enhancement] Deploy on multiple fronts without recompiling everything on each machine HOT 2
- Catalog product images in production mode delete after deploy HOT 1
- Cached data from current release causes new release to fail with redis caching HOT 6
- Change default path of Composer HOT 2
- Magento still has issues with /pub in sitemap HOT 1
- Change deployment order of DI compile and schema upgrade HOT 2
- Problem with deploy after updated module with SFTP error in setup:di:compile step HOT 5
- Doesn't work with PHP 7.4 and Magento 2..42 HOT 4
- When execute command cap staging deploy
- Issue: Cached metadata/generated files HOT 7
- How to handle initial setup:install HOT 1
- How can I flush cache file on multi server HOT 1
- touch: cannot touch '/var/www/html/releases/20220809134142/pub/static/deployed_version.txt' No such file or directory HOT 1
- Suggestion: Add arbitrary composer_flags or option to run composer with --no-plugins HOT 1
- Capistrano version
- Support for Quality Patches Tool
- When upgrading PHP version, mainenance:enable runs against old codebase, using new php version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capistrano-magento2.