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