diff options
-rw-r--r-- | docs/cmdline-opts/create-dirs.d | 3 | ||||
-rw-r--r-- | src/tool_dirhie.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/cmdline-opts/create-dirs.d b/docs/cmdline-opts/create-dirs.d index 48a8fd466..26069836e 100644 --- a/docs/cmdline-opts/create-dirs.d +++ b/docs/cmdline-opts/create-dirs.d @@ -7,6 +7,7 @@ necessary local directory hierarchy as needed. This option creates the dirs mentioned with the --output option, nothing else. If the --output file name uses no dir or if the dirs it mentions already exist, no dir will be created. -Created dirs are made with mode 0750 on unix style file systems. +Created dirs are made with mode 0777 on unix style file systems and umask is +in effect. Older versions used mode 0750. To create remote directories when using FTP or SFTP, try --ftp-create-dirs. diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c index bf11005e0..ed5302095 100644 --- a/src/tool_dirhie.c +++ b/src/tool_dirhie.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -153,7 +153,7 @@ CURLcode create_dir_hierarchy(const char *outfile, FILE *errors) msnprintf(dirbuildup, outlen, "%s%s", DIR_CHAR, tempdir); } /* Create directory. Ignore access denied error to allow traversal. */ - if(!skip && (-1 == mkdir(dirbuildup, (mode_t)0000750)) && + if(!skip && (-1 == mkdir(dirbuildup, (mode_t)0000777)) && (errno != EACCES) && (errno != EEXIST)) { show_dir_errno(errors, dirbuildup); result = CURLE_WRITE_ERROR; |