X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Futils.c;h=f1e0148cb9cb9cd28159846141a99fc108b95a58;hp=182b6eed7c700cd53579a4bac3cf74a0b1d42f8b;hb=22a1b9316f04f95a904ea724ad51aabcc389aca0;hpb=e6142f2e647e83238b1e399b1264e8adb05409f9 diff --git a/src/common/utils.c b/src/common/utils.c index 182b6eed7..f1e0148cb 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -785,7 +785,11 @@ int utils_create_stream_file(const char *path_name, char *file_name, uint64_t si goto error; } - flags = O_WRONLY | O_CREAT | O_TRUNC; + /* + * With the session rotation feature on the relay, we might need to seek + * and truncate a tracefile, so we need read and write access. + */ + flags = O_RDWR | O_CREAT | O_TRUNC; /* Open with 660 mode */ mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;