diff options
author | Seth Jennings <sjenning@redhat.com> | 2015-05-05 13:31:01 -0500 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 08:21:10 +0100 |
commit | 717ddd6380440be725ce97fd8b0d8eaa0dba5f25 (patch) | |
tree | 06b8ff6b931a3dfe0e6cfe2ad933596600c5ba49 /src/shared | |
parent | 7dc61c4539d8d96c7e858ab22b433194afbc5a0e (diff) |
Fix permissions on /run/systemd/nspawn/locks
machined is getting an EACCES when trying to create the lock file for
images because the mode on /run/systemd/nspawn/locks is 0600.
mkdir("/run/systemd/nspawn/locks", 0600) = -1 EEXIST (File exists)
stat("/run/systemd/nspawn/locks", {st_mode=S_IFDIR|0600, st_size=40, ...}) = 0
open("/run/systemd/nspawn/locks/inode-41:256", O_RDWR|O_CREAT|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC, 0600) = -1 EACCES (Permission denied)
This commit adjusts the mode to 0700 to correct the issue.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/machine-image.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c index bc215f0ad..273dacff1 100644 --- a/src/shared/machine-image.c +++ b/src/shared/machine-image.c @@ -603,7 +603,7 @@ int image_path_lock(const char *path, int operation, LockFile *global, LockFile return r; if (p) { - mkdir_p("/run/systemd/nspawn/locks", 0600); + mkdir_p("/run/systemd/nspawn/locks", 0700); r = make_lock_file(p, operation, global); if (r < 0) { @@ -643,7 +643,7 @@ int image_name_lock(const char *name, int operation, LockFile *ret) { if (streq(name, ".host")) return -EBUSY; - mkdir_p("/run/systemd/nspawn/locks", 0600); + mkdir_p("/run/systemd/nspawn/locks", 0700); p = strjoina("/run/systemd/nspawn/locks/name-", name); return make_lock_file(p, operation, ret); |