mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
fix completely wrong file permissions for log files & mavlink ftp (new mode 666)
This commit is contained in:
parent
d7ca0b1139
commit
7ff80463be
@ -797,7 +797,7 @@ MavlinkFTP::_copy_file(const char *src_path, const char *dst_path, size_t length
|
||||
dst_fd = ::open(dst_path, O_CREAT | O_TRUNC | O_WRONLY
|
||||
// POSIX requires the permissions to be supplied if O_CREAT passed
|
||||
#ifdef __PX4_POSIX
|
||||
, 0x0777
|
||||
, 0666
|
||||
#endif
|
||||
);
|
||||
if (dst_fd < 0) {
|
||||
|
||||
@ -576,7 +576,7 @@ int open_perf_file(const char* str)
|
||||
#ifdef __PX4_NUTTX
|
||||
int fd = open(log_file_path, O_CREAT | O_WRONLY | O_DSYNC);
|
||||
#else
|
||||
int fd = open(log_file_path, O_CREAT | O_WRONLY | O_DSYNC, 0x0777);
|
||||
int fd = open(log_file_path, O_CREAT | O_WRONLY | O_DSYNC, 0666);
|
||||
#endif
|
||||
|
||||
if (fd < 0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user