forked from Mirror/pmbootstrap
Fix: /var/cache/distfiles writable by everyone (#1329)
As noted in commit 255c715624
`/var/cache/distfiles` is writable by everyone. It is supposed to be
writable only by `root` and by the `abuild` group (in which we put the
`pmos` user already for building packages).
Changes:
* `pmb.build.init()`: make `/var/cache/distfiles` writable only by
members of the `abuild` group (and root)
* Increase workfolder version to 2
* Add migration code that fixes the permissions for existing work
folders
* Refactor the migration code a bit to make this possible
This commit is contained in:
parent
40db17d775
commit
4d8afc4aa5
4 changed files with 42 additions and 17 deletions
|
@ -57,7 +57,7 @@ def ask_for_work_path(args):
|
|||
if not os.path.exists(ret):
|
||||
os.makedirs(ret, 0o700, True)
|
||||
with open(ret + "/version", "w") as handle:
|
||||
handle.write(pmb.config.work_version + "\n")
|
||||
handle.write(str(pmb.config.work_version) + "\n")
|
||||
|
||||
# Make sure, that we can write into it
|
||||
os.makedirs(ret + "/cache_http", 0o700, True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue