Fixes #620
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ret = allowed_group();
if (ret < 0) {
WARN("No tracing group detected");
ret = allowed_group();
if (ret < 0) {
WARN("No tracing group detected");
+ /* Setting gid to 0 if no tracing group is found */
+ gid = 0;
+ } else {
+ gid = ret;
/* Set lttng run dir */
ret = chown(rundir, 0, gid);
if (ret < 0) {
/* Set lttng run dir */
ret = chown(rundir, 0, gid);
if (ret < 0) {
- /* Ensure tracing group can search the run dir */
+ /* Ensure all applications and tracing group can search the run dir */
ret = chmod(rundir, S_IRWXU | S_IXGRP | S_IXOTH);
if (ret < 0) {
ERR("Unable to set permissions on %s", rundir);
ret = chmod(rundir, S_IRWXU | S_IXGRP | S_IXOTH);
if (ret < 0) {
ERR("Unable to set permissions on %s", rundir);
DBG("All permissions are set");
DBG("All permissions are set");