- changed status to resolved
Monit regression wrt umask between 5.8.1 and 5.9
In 5.8.1 the do_start() method used spawn() to create a process. That method made sure the umask for the new process was the same as what monit was started with. This was done by setting Run.umask in init_env() and later restoring the saved value in spawn(). In 5.9, do_start() has been renamed to _doStart() and now calls _commandExecute() to create a process. This routine does not set the new processes umask. Instead it is inherited from the main monit process. That umask was "corrupted" by a call to file_createPidFile() from do_default(). In file_createPidFile() the umask is set to MYPIDMASK and not restored to its original value. MYPIDMASK is defined as 0122. This causes issues when monit starts a process such as Cassandra. When a namespace is defined, the corresponding directory created for it does not have the execute bit set due to the umask Cassandra inherited from monit. As a result, Cassandra cannot create any of its database files under the namespace directory since it does not have permission to do so.
Comments (3)
-
repo owner -
reporter Thanks!
-
repo owner - removed version
Removing version: 5.9 (automated comment)
- Log in to comment
Fixed, you can test the development branch if you want to, you can get snapshot here: https://bitbucket.org/tildeslash/monit/get/master.tar.gz
To compile: