ralphlange / procServ

Wrapper to start arbitrary interactive commands in the background, with telnet or Unix domain socket access to stdin/stdout
GNU General Public License v3.0
23 stars 23 forks source link

useless and misleading warning about permissions #15

Closed dirk-zimoch closed 6 years ago

dirk-zimoch commented 6 years ago

This warning is misleading and useless: procServ: Warning - Please change permissions on .... to at least -r-xr-xr-x procServ may not be able to continue without read and execute permissions

ProServ does not need read permission to execute a command binary (and it cannot check if the command is a script which would need read permission without actually reading it which would need read permission). Also the execute permissions are only needed for the current user, not for everyone. Finally the check happens at the wrong time -- at procSrv start instead of command start, which may be much later when the command is re-started. File permissions may have changed until then.

The execve() function already does all necessary checks and an error message using strerror(errno) is printed if anything goes wrong. That should be sufficient.

The checkCommandFile() function is useless and misleading and thus should be removed.

ralphlange commented 6 years ago

Agreed.