Skip to content

Commit

Permalink
Mention cause and solution for "permission denied" when running from …
Browse files Browse the repository at this point in the history
…init service.
  • Loading branch information
Ferry Boender committed Apr 30, 2017
1 parent a8425a5 commit adf3f62
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ time. These are not installed by default. You can find init scripts for
Debian / Ubuntu at `/usr/share/doc/scriptform/scriptform.init.d_debian` and
for Redhat / Centos at `/usr/share/doc/scriptform/scriptform.init.d_debian`.

**NOTE**: If you use an init script, Scriptform will run as user `root`, which
will cause Scriptform to automatically drop privileges to user `nobody` and
group `nobody` when executing shell scripts. This may cause "permission
denied" problems! See the "Execution security policy" chapter in the User
Manual for more information.

To install the init script:

For **Debian / Ubuntu** systems:
Expand Down
12 changes: 12 additions & 0 deletions doc/MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,17 @@ in some cases:
* If Scriptform itself is running as a non-root user, scripts will be executed
as that user.

If you use an init script, Scriptform will run as user `root`, which will
cause Scriptform to automatically drop privileges to user `nobody` and group
`nobody` when executing shell scripts. This may cause "permission denied"
problems! There are a few possible ways to work around this:

* Make sure the user or group `nobody` has rights to view and execute the
scripts. The form configuration itself should probably not be viewable by
user `nobody` since it may contain passwords.
* Modify the init or systemd script to run as a different user.
* Add `run_as` properties to each form definition to specify the user it
should run as.



Expand Down Expand Up @@ -1258,6 +1269,7 @@ If such a header is seen, Scriptform won't perform validation of the password
and just assumes the username is correct.



## <a name="cust">Form customization</a>

### <a name="cust_css">Custom CSS</a>
Expand Down

0 comments on commit adf3f62

Please sign in to comment.