From f61f532fafa95214e9d80b0785ec0fe6de26762c Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 29 May 2025 06:20:35 +0000 Subject: [PATCH 1/4] Test fix --- source/libublsettings-file.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/libublsettings-file.c b/source/libublsettings-file.c index 8aef530..3f5d2f0 100644 --- a/source/libublsettings-file.c +++ b/source/libublsettings-file.c @@ -94,7 +94,6 @@ int yon_file_create_full_path(char *path, mode_t rules){ if (i>2){ struct passwd *user = getpwnam(yon_ubl_root_user_get()); int chown_success = chown(temp,user->pw_uid,user->pw_gid); - int chmod_success = chmod(temp,0644); } } if (!yon_char_is_empty(current)) free(current); From 5017877ac081d60f3a533f9caf88763f795333d9 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 29 May 2025 07:01:38 +0000 Subject: [PATCH 2/4] Fixed mkdir rules --- source/libublsettings-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libublsettings-file.c b/source/libublsettings-file.c index 3f5d2f0..ddf224b 100644 --- a/source/libublsettings-file.c +++ b/source/libublsettings-file.c @@ -83,7 +83,7 @@ int yon_file_create_full_path(char *path, mode_t rules){ if (!yon_char_is_empty(temp)){ if (access(temp,F_OK)){ if (i!=size-1){ - mkdir(temp,0644); + mkdir(temp,755); struct passwd *user = getpwnam(yon_ubl_root_user_get()); } else { FILE *fl = fopen(temp,"w"); From a571a9388832a499f2941c3e0ff958e63e085cc5 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 29 May 2025 07:11:02 +0000 Subject: [PATCH 3/4] mkdir rule --- source/libublsettings-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libublsettings-file.c b/source/libublsettings-file.c index ddf224b..8c9b63c 100644 --- a/source/libublsettings-file.c +++ b/source/libublsettings-file.c @@ -83,7 +83,7 @@ int yon_file_create_full_path(char *path, mode_t rules){ if (!yon_char_is_empty(temp)){ if (access(temp,F_OK)){ if (i!=size-1){ - mkdir(temp,755); + mkdir(temp,0755); struct passwd *user = getpwnam(yon_ubl_root_user_get()); } else { FILE *fl = fopen(temp,"w"); From 93f7b09bcecbe9113f24d3abd53de6338991610f Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 29 May 2025 07:11:58 +0000 Subject: [PATCH 4/4] Chmod remove --- source/libublsettings-file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/libublsettings-file.c b/source/libublsettings-file.c index 8c9b63c..5410092 100644 --- a/source/libublsettings-file.c +++ b/source/libublsettings-file.c @@ -41,7 +41,6 @@ int yon_file_save(char *file_path, char *text){ FILE *file = fopen(file_path,"w"); struct passwd *user = getpwnam(yon_ubl_root_user_get()); if (chown(file_path,user->pw_uid,user->pw_gid)){}; - if (chmod(file_path,0644)){}; if (file){ fputs(text,file); fclose(file); @@ -58,7 +57,6 @@ int yon_file_create(char *path, char *name, int rules){ if (fl){ struct passwd *user = getpwnam(yon_ubl_root_user_get()); if (chown(path,user->pw_uid,user->pw_gid)){}; - if (chmod(path,0644)){}; fclose(fl); return 1; } else {