After writing changes in existing config, Drupal try to modify it's chmod. Not sure this is right, because, if Drupal successfully write changes to config, nothing else it should do.

Problem source

I install Drupal with 'drush si' in command line with my user: 'andyceo'. After that, all active configs have the chmod: 'rw r r' and owner=andyceo and group=andyceo.

I use ACL to allow both 'www-data' (apache2 user in ubuntu) and 'andyceo' change Drupal's 'files' folder:

$ getfacl files/
# file: files/
# owner: andyceo
# group: andyceo
user::rwx
user:www-data:rwx
user:andyceo:rwx
group::rwx
mask::rwx
other::r-x
default:user::rwx
default:user:www-data:rwx
default:user:andyceo:rwx
default:group::rwx
default:mask::rwx
default:other::rwx
Files: 
CommentFileSizeAuthor
#6 2232051-unecessary-chmod.patch890 bytestayzlor
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,123 pass(es), 0 fail(s), and 6 exception(s). View
unneccessary_chmod.patch825 bytesandyceo
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch unneccessary_chmod.patch. Unable to apply patch. See the log in the details link for more information. View

Comments

andypost’s picture

Issue tags: +Configuration system
moshe weitzman’s picture

The File API always does a chmod after updating any Drupal file. It has always been that way. I don't know if it is a good idea or not. I personally would be fine with dropping it ... Note that you can control what the chmod does using new(ish) settings in settings.php

andyceo’s picture

In Linux, you can not execute chmod on files you don't own, even files has 0777 permissions. And even you add the user that try to execute chmod to the group of the file.

For the normal access rights this is a design decision. You need richacls: WRITE_ACL and maybe WRITE_OWNER.

Further info is available here: http://unix.stackexchange.com/questions/75893/can-i-allow-users-to-chmod...

So, if we want a simple solution for ability to work fine both with drush in console and with Drupal web interface without any annoying warnings in dblog, just let get this in :)

andypost’s picture

unneccessary_chmod.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, unneccessary_chmod.patch, failed testing.

tayzlor’s picture

Status: Needs work » Needs review
FileSize
890 bytes
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] 86,123 pass(es), 0 fail(s), and 6 exception(s). View

Re-rolling last failing patch

Status: Needs review » Needs work

The last submitted patch, 6: 2232051-unecessary-chmod.patch, failed testing.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 6: 2232051-unecessary-chmod.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.