* Set the tracing group gid onto the client socket.
*
* Race window between mkdir and chown is OK because we are going from more
- * permissive (root.root) to les permissive (root.tracing).
+ * permissive (root.root) to less permissive (root.tracing).
*/
static int set_permissions(char *rundir)
{
perror("chown");
}
+ /* Ensure tracing group can search the run dir */
+ ret = chmod(rundir, S_IRWXU | S_IXGRP);
+ if (ret < 0) {
+ ERR("Unable to set permissions on %s", rundir);
+ perror("chmod");
+ }
+
/* lttng client socket path */
ret = chown(client_unix_sock_path, 0, gid);
if (ret < 0) {
DBG3("Creating LTTng run directory: %s", rundir);
- ret = mkdir(rundir, S_IRWXU | S_IRWXG );
+ ret = mkdir(rundir, S_IRWXU);
if (ret < 0) {
if (errno != EEXIST) {
ERR("Unable to create %s", rundir);
DBG2("Creating consumer directory: %s", path);
- ret = mkdir(path, S_IRWXU | S_IRWXG);
+ ret = mkdir(path, S_IRWXU);
if (ret < 0) {
if (errno != EEXIST) {
ERR("Failed to create %s", path);