From 146462845815f5472a2fb7a363333c68cbd2c7e9 Mon Sep 17 00:00:00 2001 From: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> Date: Sat, 10 Jan 2026 01:23:26 -0500 Subject: [PATCH 1/2] Create receipt & ancestor folders with correct owner, group & permissions. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> --- Sources/mas/AppStore/AppStoreAction+download.swift | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Sources/mas/AppStore/AppStoreAction+download.swift b/Sources/mas/AppStore/AppStoreAction+download.swift index 245cdc29..40c39d78 100644 --- a/Sources/mas/AppStore/AppStoreAction+download.swift +++ b/Sources/mas/AppStore/AppStoreAction+download.swift @@ -380,10 +380,17 @@ private actor DownloadQueueObserver: CKDownloadQueueObserver { if fileManager.fileExists(atPath: receiptURL.filePath) { try fileManager.removeItem(at: receiptURL) } else { - try fileManager.createDirectory(at: receiptURL.deletingLastPathComponent(), withIntermediateDirectories: true) + try fileManager.createDirectory( + at: receiptURL.deletingLastPathComponent(), + withIntermediateDirectories: true, + attributes: [.ownerAccountID: 0, .groupOwnerAccountID: 0, .posixPermissions: 0o755], + ) } try fileManager.copyItem(at: receiptHardLinkURL, to: receiptURL) - try fileManager.setAttributes([.ownerAccountID: 0, .groupOwnerAccountID: 0], ofItemAtPath: receiptURL.filePath) + try fileManager.setAttributes( + [.ownerAccountID: 0, .groupOwnerAccountID: 0, .posixPermissions: 0o755], + ofItemAtPath: receiptURL.filePath, + ) } } catch { throw MASError.error( From 9dd445a6e65df76a46f4cf02d6c6042018aab94f Mon Sep 17 00:00:00 2001 From: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> Date: Sat, 10 Jan 2026 02:03:52 -0500 Subject: [PATCH 2/2] Improve modified app outside of applications folders warning. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com> --- Sources/mas/AppStore/AppStoreAction+download.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/mas/AppStore/AppStoreAction+download.swift b/Sources/mas/AppStore/AppStoreAction+download.swift index 40c39d78..f3e56fa9 100644 --- a/Sources/mas/AppStore/AppStoreAction+download.swift +++ b/Sources/mas/AppStore/AppStoreAction+download.swift @@ -305,10 +305,9 @@ private actor DownloadQueueObserver: CKDownloadQueueObserver { } } else { MAS.printer.warning( + action.performed.capitalizingFirstCharacter, snapshot.appNameAndVersion, - "was", - action.performed, - "outside of the applications folders:", + "outside of the applications folders, in", appFolderURL.filePath, ) }