Problem/Motivation

Because drush is usually running drupal directly important checks on files modification possibilities get no or often wrong results.
This is also related to #2569495: There should be a new test for ownership of files and directories.

Steps to reproduce

For example create a folder "test" in webroot and make is writable by the cli user itself and the webserver. The GUI webserver check detects it correctly but not drush.

Proposed resolution

The minimum we need is to know which system user e.g. it's posix uid is running the related webserver/php process. This can be provided by setting.local.php. Easier to use would be an own protected route only to be called via cli which just returns this uid and guid information. With this information we can do fast tests. Maybe easier to code but with the limitations of the webserver would be an option to run checks through a route.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

C-Logemann created an issue. See original summary.

c-logemann’s picture

Currently setServerData() is just returning null on cli usage (see also #3451581: Get server uid function return unexpected type null. This is avoids corrects tests but even if we just open it would get wrong values of the file owner and they would be stored in state api.
Even if the current code will not mess up with the state API storage and cli can get correct serverdata.- This only would be available after a successful check via GUI. Beside the basic auth problematic (see related issue) this cann not work on a fresh test system e.g. in CI-Workflow.

c-logemann’s picture

setServerData() is currently triggered via cron. This could be an interface to run cron via http request. But in CI situations cron isn't always wanted depending on the system needs.

smustgrave’s picture

Hello @c-logemann since it's been a few months wonder if you want me to un-assign?

c-logemann’s picture

Assigned: c-logemann » Unassigned

@smustgrave Sorry I was to busy in last time.I think we need an own route that can be triggered by drush also with basic auth credentials, see #3454933: Checks using sub requests with guzzle get wrong results on 403 situations
But please do not close the issue. When I find some time in winter I try to solve if nobody else steps in.

smustgrave’s picture

wanted to follow up again on this one.

c-logemann’s picture

@smustgrave Thanks for bringing this issue up in my issue list. Maybe too early to assign yet again but in next weeks I may find the time to move on with this.

smustgrave’s picture

Version: 3.0.x-dev » 3.1.x-dev

Rock on.

smustgrave’s picture

Status: Active » Postponed (maintainer needs more info)