Commit dbd75fc9 authored by Tomáš Peterka's avatar Tomáš Peterka

Non-executable SlapOS resource file

parent 1f154212
...@@ -633,7 +633,7 @@ class Computer(object): ...@@ -633,7 +633,7 @@ class Computer(object):
class Partition(object): class Partition(object):
"Represent a computer partition" """Represent a computer partition."""
resource_file = ".slapos-resource" resource_file = ".slapos-resource"
...@@ -701,7 +701,7 @@ class Partition(object): ...@@ -701,7 +701,7 @@ class Partition(object):
with open(file_path, "wb") as fo: with open(file_path, "wb") as fo:
json.dump(data, fo, sort_keys=True, indent=4) json.dump(data, fo, sort_keys=True, indent=4)
owner_pw = pwd.getpwnam(self.user.name) owner_pw = pwd.getpwnam(self.user.name)
os.chmod(file_path, 0o740) os.chmod(file_path, 0o640)
os.chown(file_path, owner_pw.pw_uid, owner_pw.pw_gid) os.chown(file_path, owner_pw.pw_uid, owner_pw.pw_gid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment