Comments (10)
That seems odd. What permissions are necessary to avoid this? I think we need to focus on permissions rather than owners.
from blt.
It's an issue of ownership, not permissions. You can only chmod files that you own. As far as I know, there's simply no way to reliably run chmod on the files directory unless you use sudo or the www-data user that owns the files.
from blt.
Well locally we could sticky bit permissions on the files directory during initial setup, thus it can be a permissions issue.
No clue if Windows supports something like that, thus this may be a *nix based fix.
from blt.
Sounds reasonable. I'm not very familiar with the sticky bit or if it allows you to chmod files you don't own. It sounds like we'd set the sticky bit on the files directory and this would essentially give the local user root access to that directory?
from blt.
I'm not saying it should be the resolution. The existing might still fail, or it will just not execute if the action would result in no change. Well, the sticky bit wouldn't be 'root' level access, more like create a shared/public folder which multiple users (www-data, local user etc) have the same write access.
from blt.
I'm making the chmod optional for the time being to circumvent this issue: #137
from blt.
Thanks. I've been testing this and I can't find any way around it (sticky bit doesn't help). Because of Drupal's file structure, I think there's simply no way to reliable chmod anything in the files directory. The logic is pretty simple:
- The web server will create files owned by itself in the files directory. There's no way to avoid this that I know of.
- You cannot chmod or chown files that you don't already own. You also can't remove them. If you want to fully manage a Drupal install, you basically are required to have sudo access.
from blt.
@grasmash that was actually not the problematic line. There's several instances of chmod
in setup.xml
, the one that causes problems is this one: https://github.com/acquia/blt/blob/8.x/template/build/core/phing/tasks/setup.xml#L90
I opened #151 to fix this. But I think this is only a stopgap (it still fills the screen/logs with tons of "failures").
@grasmash can we just make the chmod more selective so it excludes the files directory? I'm not sure what the original intent was
from blt.
Another issue is that files should only receive 644
(no execute bit). I have files that are committed to git as 644
, and re-running a site install unnecessarily marks them as changed due to the permission change to 755
.
Not quite sure why this chmod is actually needed, other than maybe making sure the files are readable by the webserver even if the owner and group are different than the webserver user?
from blt.
Seems like multiple merged PRs have addressed this issue.
@danepowell sites/default
needs to be writable in order to create local.settings.php and in order to modify settings.php (to add blt.settings.php require statement) when necessary.
from blt.
Related Issues (20)
- BLT-5202: Guzzle 7 Breaks Run-server Command
- BLT-5206: Remove cache.php, no longer needed for drush HOT 5
- BLT-5207: BLT excludes drush/Commands/custom
- BLT-5208: Replace abandoned composer package 'webmozart/path-util'
- BLT-5209: [info] Waiting for non-50x response from http://localhost:9222... HOT 4
- BLT-5211: acquia blt documentation is outdated, causing crashes and installation issues HOT 6
- BLT-5213: local.settings.php is not detecting on Acquia cloud IDE. HOT 1
- BLT-5215: UserConfig Class not found HOT 3
- BLT-5216: drupal:sync:default:site requires --no-interaction during ci on pipelines HOT 1
- BLT-5217: Undefined array key "bootstrap" for Inspector when Drupal is not installed
- drupal:sync:default:site and ckeditor 4 removal and other updb issues HOT 3
- Drush Launcher busted with Drush 12 HOT 6
- Additional logging during drupal:update command
- BLT-5223: BLT build starts failing after upgrade to 13.7 with Drush 12.1 HOT 1
- BLT-5224: Add back PHP code sniffing in pre-commit hook HOT 2
- Respect PHP and Drupal error logging HOT 1
- BLT-5228: test issue
- BLT-5229: How to hook into artifact:build when using deploy command
- BLT-5231: Update assertion handling to remove use of deprecated class HOT 1
- Announcing BLT’s End of Life HOT 13
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 blt.