-
Notifications
You must be signed in to change notification settings - Fork 21
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
Weird permissions on settings.php causing issues #54
Comments
I think I've noticed this as well; the only way I'm able to remove On Fri, Aug 23, 2013 at 5:39 PM, Will Hastings [email protected]:
Co-founder Kalamuna, LLC http://www.kalamuna.com |
…s files, including write-protected ones like settings.php.
So I verified that Drupal is repeatedly setting sites/default, sites/default/settings.php, and sites/default/default.settings.php to non-writable permissions. This happens whenever system_requirements() runs. The commit above fixes this for site removal via our drush crush command, simply by chmod'ing these to writable before removing the site's webroot directory. Unfortunately, the issue of git being unable to update settings.php still exists. I was hoping there would be a git hook I could use to make it writable before the merge happens, but there's no pre-merge hook, only post. @patcon and @tizzo, have either of you encountered this type of issue before? We would definitely appreciate any insight you may have. |
Yeah, I've had that exact issue a number of times. I don't really know of a good fix. The way I've handled it is by ensuring that we never actually use the default site (we create a site folder for the local name (we use mysite.local)) and dynamically generate the settings.php file to be placed there. That way we do not get git conflicts. I think trying to use git hooks for this would be a bit of a hacky work around. Also, I've encountered another issue on some machines where once the perms get changed the only way I have managed to get it back to a deletable state was to change the perm on the host system because the guest got blocked based on the way NFS user and group mapping was working. The thing I have been planning to experiment with is whether we could do some magic in vagrant to detect the user and group running vagrant on the host and mapping that user to the vagrant user in the NFS mount so that this permission orphaning wouldn't occur. I don't think git hooks are the right way to handle this issue either. |
Thanks so much for the insight Howard. It's definitely a tricky issue to solve. I agree a git hook would be hacky, and I didn't see a way to do it with one anyway. I like the sound of linking the guest user to the host group. Please let us know if you have any luck with that. |
Sorry guys, we don't version-control the settings.php file either, so I don't really hit the git pull problem. Whenever we programmatically delete the docroot for something, we simply make sure that the script that does the deletion runs |
I've seen chmod 777 fail too depending on the host/client NFS share and On Tue, Sep 3, 2013 at 3:31 PM, Patrick Connolly
|
@tizzo we've observed similar behavior as well. would love to not vc settings.php but we often put a lot of pantheon centric stuff in there. |
Closing this because it should be addressed here now |
Correct me if I'm wrong but these issues can result from the permission on settings.php getting set to the recommended permissions when in a file share ( |
Very well could be correct. While testing terminatur late last night i did notice that trying to either Either way... tried to make Terminatur relatively kalastack agnostic ie |
Yeah, I haven't looked into Terminatur yet. It looks to do a lot of the same things fetcher does (setting up vhosts, databases, etc) but looks to be pantheon specific? Fetcher doesn't support pantheon yet but aims to be platform agnostic. We definitely have some overlap and I wonder if we should be collaborating on this stuff. |
that would be v4, actually, v3 is the d7 port. ;) |
👍 |
Not to butt in, but I can confirm what Howard has mentioned - making a new local.mysite folder in the sites folder, and duping my local site settings there. I learned it from DAMP, actually, because DAMP can be configured to do it that way, and it's what always worked best for me. I always wished they had an auto-symlink function that linked back your sites/default/files folder from this sites/local.mysite folder, so I didn't have to do it manually. But either way, this sites/local (with a gitignore for the folder/*) is the only system I ever have figured out that works and avoids dealing with the round-robin permissions hassle. Kelly Bell |
I've noticed that some sites built on the box have sites/default/settings.php set to weird permissions, such as 0444. This has resulted in two problems:
The text was updated successfully, but these errors were encountered: