From: Serge Hallyn Date: Mon, 15 May 2017 11:05:31 +0000 (+0200) Subject: storage: use 0711 as the default perms for dirs X-Git-Tag: v3.4.0-rc1~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=756ef0c353a8bdda8a92ab26ce4629c7b158234a;p=thirdparty%2Flibvirt.git storage: use 0711 as the default perms for dirs There should be no need to make dir based pools world/group readable. So use 0711, not 0755, as the default perms for storage dirs. Updates in v2: - adapt commit wording to mention dropping group readable as well Signed-off-by: Christian Ehrhardt --- diff --git a/docs/formatstorage.html.in b/docs/formatstorage.html.in index 225e190002..4946ddf708 100644 --- a/docs/formatstorage.html.in +++ b/docs/formatstorage.html.in @@ -444,7 +444,7 @@ namespace. It provides information about the permissions to use for the final directory when the pool is built. There are 4 child elements. The mode element contains the octal permission set. - The mode defaults to 0755 when not provided. + The mode defaults to 0711 when not provided. The owner element contains the numeric user ID. The group element contains the numeric group ID. If owner or group aren't specified when diff --git a/src/storage/storage_util.h b/src/storage/storage_util.h index a05c35d81b..6f2a1b189e 100644 --- a/src/storage/storage_util.h +++ b/src/storage/storage_util.h @@ -138,7 +138,7 @@ int virStorageBackendVolOpen(const char *path, struct stat *sb, ATTRIBUTE_RETURN_CHECK ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); -# define VIR_STORAGE_DEFAULT_POOL_PERM_MODE 0755 +# define VIR_STORAGE_DEFAULT_POOL_PERM_MODE 0711 # define VIR_STORAGE_DEFAULT_VOL_PERM_MODE 0600 int virStorageBackendUpdateVolInfo(virStorageVolDefPtr vol,