summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGalin Simeonov <gts@volconst.com>2021-09-27 01:35:11 +0300
committerGalin Simeonov <gts@volconst.com>2021-09-27 01:35:11 +0300
commit1ba29b1754201d2e40b30fd73fd65ce249512132 (patch)
treeeb6bb86836aba48c2c62f43a47dc7099f85819e2
parent8f9c2f76af222b5d3374fb575d953f1bc80f9ff8 (diff)
downloadvolgit-1ba29b1754201d2e40b30fd73fd65ce249512132.tar.gz
created directories did not allow entry
-rw-r--r--system_part.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/system_part.c b/system_part.c
index f8d91db..94eccd9 100644
--- a/system_part.c
+++ b/system_part.c
@@ -29,7 +29,7 @@ void parse_options(int argc,char **argv)
options.output_dir_fd=open(options.output_path,O_RDONLY|O_DIRECTORY);
if(options.output_dir_fd==-1)
{
- mkdir(options.output_path,0770);
+ mkdir(options.output_path,0775);
options.output_dir_fd=open(options.output_path,O_RDONLY|O_DIRECTORY);
if(options.output_dir_fd==-1)
die("Could not open output dir\n");
@@ -66,7 +66,7 @@ int create_branch_dir(const char *branch_name)
ret=openat(options.output_dir_fd,branch_name,O_DIRECTORY|O_RDONLY);
if(ret==-1)
{
- if(mkdirat(options.output_dir_fd,branch_name,0770)==-1)
+ if(mkdirat(options.output_dir_fd,branch_name,0775)==-1)
die("Could not create branch directory for %s\n",branch_name);
ret=openat(options.output_dir_fd,branch_name,O_DIRECTORY|O_RDONLY);
@@ -92,7 +92,7 @@ FILE* create_file(int branch_dir,const char *filename)
memcpy(new_filename+old_filename_len,".html",sizeof(".html"));
unlinkat(branch_dir,new_filename,0);
- fd=openat(branch_dir,new_filename,O_CREAT|O_RDWR,0660);
+ fd=openat(branch_dir,new_filename,O_CREAT|O_RDWR,0664);
if(fd==-1)
die("Could not open the file '%s' for one of the branches\n",filename);
@@ -115,7 +115,7 @@ int create_dir(int base_dir,const char *dir_name)
if(ret!=-1)
return ret;
- mkdirat(base_dir,dir_name,0770);
+ mkdirat(base_dir,dir_name,0775);
ret=openat(base_dir,dir_name,O_DIRECTORY|O_RDONLY);
if(ret==-1)
die("Could not create the 'files' subdirectory of one of the branch dirs\n");