Skip to content
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

Chilli process cannot write to status file when not run as root #472

Open
tomlloydveea opened this issue Mar 5, 2019 · 0 comments
Open

Comments

@tomlloydveea
Copy link

Scenario:
When running the chilli process as a non root user the following output is seen when trying to start and stop the chilli process when using the status file for client tracking:

/usr/sbin/chilli --tundev tun0 --module tun --pidfile /var/run/chilli/chilli.pid --usestatusfile /var/run/chilli/chilli.status --statusfilesave --conf /etc/chilli.conf --uid 101 (chilli) --gid 102 (chilli)-
Expected Behaviour:
The process starts and create a chilli process with the corresponding status file.

Actual Behaviour:
When creating the status file:
No File or Directory: chiili.status

chilli[456]: printstatus(322): Writing status file: /tmp/chilli.status
chilli[456]: Permission denied: could not open file /tmp/chilli.status
chilli[456]: Permission denied: could not save status file

Then I touched /var/run/chilli/chilli.status and this when starting and stopping the process.
I tried with all combinations of root/chilli ownership/groups with all variations of permissions on the file.
chilli[12262]: Bad file descriptor: write(-1, 1)

When asking the process to terminate it will hang and my script will eventually kill the process.
daemon.err chilli[11443]: Bad file descriptor: write(-1, 1)
ERROR: chilli Sending KILL Signal as the process did not exit.

No status data is written to the file.

When the process is started as root and is not set to change to the chilli user the status file is created and written to as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant