From cb5db8ec83cfa923331ae12ffa5cfecf76c07d8e Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Thu, 21 May 2015 10:37:15 -0700 Subject: [PATCH] dataman: Fixed file permissions on file creation In Linux the file was being created with incorrect permissions. Signed-off-by: Mark Charlebois --- src/modules/dataman/dataman.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/dataman/dataman.c b/src/modules/dataman/dataman.c index 799723eeed..15c568735b 100644 --- a/src/modules/dataman/dataman.c +++ b/src/modules/dataman/dataman.c @@ -671,7 +671,12 @@ task_main(int argc, char *argv[]) } /* Open or create the data manager file */ - g_task_fd = open(k_data_manager_device_path, O_RDWR | O_CREAT | O_BINARY, 0x0777); + g_task_fd = open(k_data_manager_device_path, O_RDWR | O_CREAT | O_BINARY +#ifdef __PX4_LINUX + // Open with read/write permission for user + , S_IRUSR | S_IWUSR +#endif + ); if (g_task_fd < 0) { warnx("Could not open data manager file %s", k_data_manager_device_path);