Skip to content

edgesense_drupal fails silently if run without login shell #101

@tanius

Description

@tanius

Currently, any method to call the edgesense_drupal script as a user without a login shell (means if the shell is set to /bin/nologin or /bin/false in /etc/passwd) fails:

  • It happens when ticking "Run During Cron" on the Script Configuration screen (/admin/edgesense/script-param) and then running the Drupal cron job under a user without login shell, such as with the following entry in /etc/cron.d/somefile:

    08 * * * * web1  drush @site-alias cron
    
  • It happens when calling the edgesense_drupal script directly in a cron job using a user without a login shell, such as with the following entry in /etc/cron.d/somefile:

    10 5 * * *  web1 edgesense_drupal /path/to/edgesense/script/run.json
    
  • It happens when running the edgesense_drupal command from above directly in a terminal, for example by executing (as root):

    su web1 -c "edgesense_drupal /path/to/edgesense/script/run.json"
    

All of these fail silently, without an error message on the screen or the Edgesense log. However they should not fail, since cron is normally able to run any command as users without login shells (see here – and it works fine with the web1 user in our deployment for other cron jobs).

When specifying a shell explicitly, the above command works successfully, confirming that the problem is the absence of a login shell (and not permission issues etc.):

su web1 --shell /bin/sh --command "edgesense_drupal /path/to/edgesense/script/run.json"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions