Skip to content

Commit

Permalink
esm-cache: fix permissions used for creating apt directories
Browse files Browse the repository at this point in the history
  • Loading branch information
orndorffgrant committed Apr 15, 2024
1 parent 3ff325a commit 6ef38a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion uaclient/apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ def _ensure_esm_cache_structure():
for file in ESM_BASIC_FILE_STRUCTURE["files"]:
system.create_file(file)
for folder in ESM_BASIC_FILE_STRUCTURE["folders"]:
os.makedirs(folder, exist_ok=True, mode=755)
os.makedirs(folder, exist_ok=True, mode=0o755)


def update_esm_caches(cfg) -> None:
Expand Down
6 changes: 4 additions & 2 deletions uaclient/tests/test_apt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1610,10 +1610,12 @@ def test_create_when_necessary(
mock.call(
tmpdir + "/var/cache/apt/archives/partial",
exist_ok=True,
mode=755,
mode=0o755,
),
mock.call(
tmpdir + "/var/lib/apt/lists/partial", exist_ok=True, mode=755
tmpdir + "/var/lib/apt/lists/partial",
exist_ok=True,
mode=0o755,
),
]

Expand Down

0 comments on commit 6ef38a5

Please sign in to comment.