From: Michael Vrable Date: Thu, 19 Jul 2007 16:42:38 +0000 (-0700) Subject: Respect umask when creating backup files. X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=bf947741ac8f65e74d594a1e14e94d90320b403e;p=cumulus.git Respect umask when creating backup files. Previously backup files were created with permissions of 0600 before the umask was subtracted. Set it to 0666 now; the user can adjust the permissions to make them more restrictive by changing the umask or permissions in the parent directories. --- diff --git a/store.cc b/store.cc index eb1c6da..8f2c8b3 100644 --- a/store.cc +++ b/store.cc @@ -57,7 +57,7 @@ Tarfile::Tarfile(const string &path, const string &segment) filter_fd = spawn_filter(real_fd); if (tar_fdopen(&t, filter_fd, (char *)path.c_str(), NULL, - O_WRONLY | O_CREAT, 0600, TAR_VERBOSE | TAR_GNU) == -1) + O_WRONLY | O_CREAT, 0666, TAR_VERBOSE | TAR_GNU) == -1) throw IOException("Error opening Tarfile"); }