Only the special user that runs the RunToolServer (usually named "vruntool") can write in the directories where tools run. If the RunToolServer is started as any other user, tools may get "Permission denied" errors. The RunToolServer should check for this and exit with an error message if it's not running as the correct user.
This should probably be implemented by calling VDirSurrogate::getUserInfo and checking the "is_runtool" boolean in the result. Also, it should check that the user ID it's running as matches the "unix_uid" member variable of the result in case the server thinks that the same username has a different UID. See the code implementing the vid command to see how this could be done.
This issue usually doesn't come up, and if it does arguably something is mis-configured. If it should come up it would be nice to automatically detect it, print a descriptive error message, and avoid the problem by not trying to run any tools.
A possible enhancement would be to detect if the RunToolServer is started as root and automatically change to the correct user.
Log in to post a comment.