@synopackageland/cli 0.46.0 → 0.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/build-spk/share-validation.d.ts +8 -3
- package/dist/build-spk/share-validation.js +7 -4
- package/dist/build-spk/wizard-messages.d.ts +22 -0
- package/dist/build-spk/wizard-messages.js +49 -27
- package/dist/deploy/native-install-values.js +4 -1
- package/dist/standalone/lifecycle.js +2 -2
- package/dist/standalone/shared-folder.d.ts +5 -2
- package/dist/standalone/shared-folder.js +35 -34
- package/docs/shared-folders.md +86 -0
- package/package.json +4 -3
- package/skills/SKILL.md +2 -0
- package/skills/reference/compose.md +23 -14
- package/skills/reference/files.md +1 -1
- package/skills/reference/install.md +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.47.1 (2026-11-02)
|
|
4
|
+
|
|
5
|
+
- Publish from a validated clean package directory so npm does not expose tarball source paths in registry installation metadata
|
|
6
|
+
- Add a loopback registry regression that inspects the actual npm request and checks the published archive against gated bytes
|
|
7
|
+
- Shared-folder grants and runtime behavior remain those of 0.47.0
|
|
8
|
+
|
|
9
|
+
## 0.47.0 (2026-11-02)
|
|
10
|
+
|
|
11
|
+
- Grant the declared package-account RO/RW on wizard-selected existing shares through DSM data-share, on install, upgrade and repair; no pre-existing account access is required
|
|
12
|
+
- Validate names and supported local mounted folder types with distinct localized errors, preserving package-account source resolution and startup kernel checks
|
|
13
|
+
- Prefill and confirm the actual upgrade selection so the worker grant and saved configuration agree; default fresh CLI dedicated installs to the declared share name
|
|
14
|
+
- Document that DSM retains selected shares, data and package-account ACLs after uninstall, with administrator revocation instructions
|
|
15
|
+
- Add metadata, lifecycle and generated-SPK regressions plus an owned-share device acceptance fixture
|
|
16
|
+
|
|
3
17
|
## 0.46.0
|
|
4
18
|
|
|
5
19
|
- Accept direct `ipc.StartPackagePeerUnix` calls as the SDK boundary for credential-authorized package-account protocols
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export interface ShareValidationMessages {
|
|
2
|
+
invalidName: string;
|
|
3
|
+
unavailable: string;
|
|
4
|
+
unsupported: string;
|
|
5
|
+
}
|
|
6
|
+
/** Read-only folder validation. DSM data-share grants the package account after
|
|
7
|
+
* consent; the account need not exist when the install wizard is displayed. */
|
|
8
|
+
export declare function existingShareValidator(messages: ShareValidationMessages, blank?: boolean, dedicatedName?: string): string;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
/** Read-only
|
|
2
|
-
*
|
|
3
|
-
export function existingShareValidator(
|
|
4
|
-
|
|
1
|
+
/** Read-only folder validation. DSM data-share grants the package account after
|
|
2
|
+
* consent; the account need not exist when the install wizard is displayed. */
|
|
3
|
+
export function existingShareValidator(messages, blank = false, dedicatedName = '') {
|
|
4
|
+
const nameError = JSON.stringify(messages.invalidName);
|
|
5
|
+
const unavailable = JSON.stringify(messages.unavailable);
|
|
6
|
+
const unsupported = JSON.stringify(messages.unsupported);
|
|
7
|
+
return `{var name=arguments[0];if(!name)return ${blank ? 'true' : nameError};if(typeof name!=='string'||name.length>32||name.trim()!==name||/^[.@]/.test(name)||name.indexOf('..')!==-1||/[\\x00-\\x1f\\x7f/\\\\:"<>|?*{}]/.test(name)||/^(homes?|users|ftp|root|admin|guest|system|volume[0-9]*|(usb|sata|sd)share[0-9]*|ActiveBackupforBusiness|surveillance|docker|web_packages)$/i.test(name))return ${nameError};try{var login=new XMLHttpRequest();login.open('GET','/webman/login.cgi?enable_syno_token=yes',false);login.send();var token=JSON.parse(login.responseText).SynoToken;if(!token)throw new Error();var x=new XMLHttpRequest();x.open('POST','/webapi/entry.cgi',false);x.setRequestHeader('Content-Type','application/x-www-form-urlencoded');x.setRequestHeader('X-SYNO-TOKEN',token);var data={api:'SYNO.Core.Share',version:1,method:'get',name:name,additional:JSON.stringify(['encryption','is_aclmode','is_force_readonly','is_share_moving','is_missing_share','is_offline_share','is_c2_share','load_worm_attr','load_tiering_attr','is_tiering_bucket','is_cluster_share','is_cold_storage_share'])};x.send(Object.keys(data).map(function(k){return encodeURIComponent(k)+'='+encodeURIComponent(data[k])}).join('&'));if(x.status!==200)throw new Error();var j=JSON.parse(x.responseText);if(j.success!==true){if(name===${JSON.stringify(dedicatedName)}&&j.error&&j.error.code===402)return true;return ${unavailable}}var share=j.data;if(!share||share.name!==name)return ${unavailable};if(typeof share.vol_path!=='string'||![0,1,2].includes(share.encryption))return ${unavailable};if(!/^\\/volume[0-9]+$/.test(share.vol_path)||share.is_remote_share||share.is_cluster_share||share.is_cold_storage_share||share.is_usb_share||share.is_aclmode!==true||share.encryption===2||share.is_force_readonly||share.is_share_moving||share.is_missing_share||share.is_offline_share||share.is_c2_share||share.is_worm_share||share.worm_state||share.is_tiering_bucket||(share.worm_subvol_mode&&share.worm_subvol_mode!=='normal'))return ${unsupported};return true}catch(e){return ${unavailable}}}`;
|
|
5
8
|
}
|
|
@@ -87,6 +87,28 @@ export declare const WIZARD_MESSAGES: {
|
|
|
87
87
|
es: string;
|
|
88
88
|
it: string;
|
|
89
89
|
};
|
|
90
|
+
"nativeShare.selectionUnavailable": {
|
|
91
|
+
en: string;
|
|
92
|
+
"zh-TW": string;
|
|
93
|
+
"zh-CN": string;
|
|
94
|
+
ja: string;
|
|
95
|
+
ko: string;
|
|
96
|
+
de: string;
|
|
97
|
+
fr: string;
|
|
98
|
+
es: string;
|
|
99
|
+
it: string;
|
|
100
|
+
};
|
|
101
|
+
"nativeShare.selectionUnsupported": {
|
|
102
|
+
en: string;
|
|
103
|
+
"zh-TW": string;
|
|
104
|
+
"zh-CN": string;
|
|
105
|
+
ja: string;
|
|
106
|
+
ko: string;
|
|
107
|
+
de: string;
|
|
108
|
+
fr: string;
|
|
109
|
+
es: string;
|
|
110
|
+
it: string;
|
|
111
|
+
};
|
|
90
112
|
"settings.originInvalid": {
|
|
91
113
|
en: string;
|
|
92
114
|
"zh-TW": string;
|
|
@@ -66,26 +66,48 @@ export const WIZARD_MESSAGES = {
|
|
|
66
66
|
"it": "Inserire un’origine HTTPS radice con la porta HTTPS selezionata in questa procedura"
|
|
67
67
|
},
|
|
68
68
|
"nativeShare.optionalExisting": {
|
|
69
|
-
"en": "Optional: choose an
|
|
70
|
-
"zh-TW": "
|
|
71
|
-
"zh-CN": "
|
|
72
|
-
"ja": "
|
|
73
|
-
"ko": "
|
|
74
|
-
"de": "Optional:
|
|
75
|
-
"fr": "Facultatif : choisissez un dossier partagé
|
|
76
|
-
"es": "Opcional: elija una carpeta compartida
|
|
77
|
-
"it": "Facoltativo: scegli una cartella condivisa
|
|
69
|
+
"en": "Optional: choose an existing shared folder, or keep {name} to use the dedicated folder",
|
|
70
|
+
"zh-TW": "選填:選擇既有共用資料夾,保留 {name} 則使用專用資料夾",
|
|
71
|
+
"zh-CN": "可选:选择现有共享文件夹,保留 {name} 则使用专用文件夹",
|
|
72
|
+
"ja": "任意:既存の共有フォルダを選択するか、{name} のままで専用フォルダを使用",
|
|
73
|
+
"ko": "선택 사항: 기존 공유 폴더를 선택하거나 {name} 유지하여 전용 폴더 사용",
|
|
74
|
+
"de": "Optional: vorhandenen gemeinsamen Ordner wählen oder {name} als eigenen Ordner beibehalten",
|
|
75
|
+
"fr": "Facultatif : choisissez un dossier partagé existant ou conservez {name} pour utiliser le dossier dédié",
|
|
76
|
+
"es": "Opcional: elija una carpeta compartida existente o conserve {name} para usar la carpeta dedicada",
|
|
77
|
+
"it": "Facoltativo: scegli una cartella condivisa esistente o mantieni {name} per usare la cartella dedicata"
|
|
78
78
|
},
|
|
79
79
|
"nativeShare.selectionInvalid": {
|
|
80
|
-
"en": "
|
|
81
|
-
"zh-TW": "
|
|
82
|
-
"zh-CN": "
|
|
83
|
-
"ja": "
|
|
84
|
-
"ko": "
|
|
85
|
-
"de": "
|
|
86
|
-
"fr": "
|
|
87
|
-
"es": "
|
|
88
|
-
"it": "
|
|
80
|
+
"en": "Enter a valid shared folder name, not a path, hidden name or reserved system name",
|
|
81
|
+
"zh-TW": "請輸入有效的共用資料夾名稱,不可使用路徑、隱藏名稱或保留的系統名稱",
|
|
82
|
+
"zh-CN": "请输入有效的共享文件夹名称,不可使用路径、隐藏名称或保留的系统名称",
|
|
83
|
+
"ja": "有効な共有フォルダ名を入力してください(パス、隠し名、予約済みシステム名は不可)",
|
|
84
|
+
"ko": "올바른 공유 폴더 이름을 입력하십시오 (경로, 숨김 이름, 예약된 시스템 이름 제외)",
|
|
85
|
+
"de": "Geben Sie einen gültigen gemeinsamen Ordnernamen ein, keinen Pfad, versteckten oder reservierten Systemnamen",
|
|
86
|
+
"fr": "Saisissez un nom de dossier partagé valide, sans chemin, nom caché ni nom système réservé",
|
|
87
|
+
"es": "Introduzca un nombre de carpeta compartida válido, sin rutas ni nombres ocultos o reservados del sistema",
|
|
88
|
+
"it": "Inserisci un nome di cartella condivisa valido, senza percorsi, nomi nascosti o nomi di sistema riservati"
|
|
89
|
+
},
|
|
90
|
+
"nativeShare.selectionUnavailable": {
|
|
91
|
+
"en": "Cannot find or verify this shared folder in DSM; refresh the folder list and choose an existing folder",
|
|
92
|
+
"zh-TW": "DSM 找不到或無法確認此共用資料夾;請重新整理清單並選擇既有資料夾",
|
|
93
|
+
"zh-CN": "DSM 找不到或无法确认此共享文件夹;请刷新列表并选择现有文件夹",
|
|
94
|
+
"ja": "DSM で共有フォルダを確認できません。一覧を更新して既存のフォルダを選択してください",
|
|
95
|
+
"ko": "DSM에서 이 공유 폴더를 찾거나 확인할 수 없습니다; 목록을 새로 고치고 기존 폴더를 선택하십시오",
|
|
96
|
+
"de": "DSM kann diesen gemeinsamen Ordner nicht finden oder prüfen; aktualisieren Sie die Liste und wählen Sie einen vorhandenen Ordner",
|
|
97
|
+
"fr": "DSM ne trouve pas ou ne peut pas vérifier ce dossier partagé ; actualisez la liste et choisissez un dossier existant",
|
|
98
|
+
"es": "DSM no puede encontrar o verificar esta carpeta compartida; actualice la lista y elija una carpeta existente",
|
|
99
|
+
"it": "DSM non trova o non può verificare questa cartella condivisa; aggiorna l’elenco e scegli una cartella esistente"
|
|
100
|
+
},
|
|
101
|
+
"nativeShare.selectionUnsupported": {
|
|
102
|
+
"en": "Choose a mounted, writable local folder with Windows ACL; external, remote, C2, tiering bucket, WORM, moving, offline and read-only folders are unsupported",
|
|
103
|
+
"zh-TW": "請選擇已掛載、可寫入且使用 Windows ACL 的本機資料夾;不支援外接、遠端、C2、分層儲存 bucket、WORM、搬移中、離線或唯讀資料夾",
|
|
104
|
+
"zh-CN": "请选择已挂载、可写入且使用 Windows ACL 的本地文件夹;不支持外接、远程、C2、分层存储 bucket、WORM、移动中、离线或只读文件夹",
|
|
105
|
+
"ja": "マウント済みで書き込み可能な Windows ACL のローカルフォルダを選択してください(外部、リモート、C2、階層化バケット、WORM、移動中、オフライン、読み取り専用は未対応)",
|
|
106
|
+
"ko": "마운트되고 쓰기 가능한 Windows ACL 로컬 폴더를 선택하십시오 (외부, 원격, C2, 계층화 버킷, WORM, 이동 중, 오프라인, 읽기 전용 폴더 제외)",
|
|
107
|
+
"de": "Wählen Sie einen eingebundenen, beschreibbaren lokalen Ordner mit Windows-ACL; externe, entfernte, C2-, Tiering-Bucket-, WORM-, verschobene, offline und schreibgeschützte Ordner werden nicht unterstützt",
|
|
108
|
+
"fr": "Choisissez un dossier local monté et inscriptible avec ACL Windows ; dossiers externes, distants, C2, buckets hiérarchisés, WORM, en déplacement, hors ligne ou en lecture seule non pris en charge",
|
|
109
|
+
"es": "Elija una carpeta local montada y escribible con ACL de Windows; no se admiten carpetas externas, remotas, C2, buckets de niveles, WORM, en traslado, sin conexión o de solo lectura",
|
|
110
|
+
"it": "Scegli una cartella locale montata e scrivibile con ACL Windows; cartelle esterne, remote, C2, bucket di tiering, WORM, in spostamento, offline o di sola lettura non supportate"
|
|
89
111
|
},
|
|
90
112
|
"settings.originInvalid": {
|
|
91
113
|
"en": "Enter an HTTPS origin such as https://app.example{port}, without a path, credentials, query or fragment",
|
|
@@ -781,15 +803,15 @@ export const WIZARD_MESSAGES = {
|
|
|
781
803
|
it: "Se un'approvazione dell'amministratore dell'executor di {package} è ancora valida, la disinstallazione esegue come root il passaggio di disinstallazione root approvato. Senza un'approvazione valida il passaggio viene saltato e ciò che avrebbe rimosso resta da pulire per un amministratore.",
|
|
782
804
|
},
|
|
783
805
|
"nativeShare.selectIntro": {
|
|
784
|
-
"en": "Choose an existing shared folder
|
|
785
|
-
"zh-TW": "
|
|
786
|
-
"zh-CN": "
|
|
787
|
-
"ja": "
|
|
788
|
-
"ko": "패키지 계정 {account}에 {permission}
|
|
789
|
-
"de": "Wählen Sie einen vorhandenen gemeinsamen Ordner
|
|
790
|
-
"fr": "Choisissez un dossier partagé existant
|
|
791
|
-
"es": "
|
|
792
|
-
"it": "
|
|
806
|
+
"en": "Choose an existing shared folder to authorize DSM to grant package account {account} {permission} access during installation or upgrade; other accounts and files are kept",
|
|
807
|
+
"zh-TW": "選擇既有共用資料夾,即授權 DSM 在安裝或升級時授予套件帳號 {account}「{permission}」權限;其他帳號與檔案會保留",
|
|
808
|
+
"zh-CN": "选择现有共享文件夹,即授权 DSM 在安装或升级时授予套件账户 {account}“{permission}”权限;其他账户与文件会保留",
|
|
809
|
+
"ja": "既存の共有フォルダを選択して、インストールまたは更新時に DSM がパッケージアカウント {account} に {permission} 権限を付与することを許可します。他のアカウントとファイルは保持されます",
|
|
810
|
+
"ko": "기존 공유 폴더를 선택하면 설치 또는 업그레이드 시 DSM이 패키지 계정 {account}에 {permission} 권한을 부여합니다; 다른 계정과 파일은 유지됩니다",
|
|
811
|
+
"de": "Wählen Sie einen vorhandenen gemeinsamen Ordner; DSM erteilt Paketkonto {account} bei Installation oder Upgrade {permission}-Zugriff, andere Konten und Dateien bleiben erhalten",
|
|
812
|
+
"fr": "Choisissez un dossier partagé existant pour autoriser DSM à accorder au compte du paquet {account} l’accès {permission} à l’installation ou la mise à niveau ; les autres comptes et fichiers sont conservés",
|
|
813
|
+
"es": "Elija una carpeta compartida existente para autorizar a DSM a conceder acceso {permission} a la cuenta del paquete {account} al instalar o actualizar; las demás cuentas y archivos se conservan",
|
|
814
|
+
"it": "Scegli una cartella condivisa esistente per autorizzare DSM a concedere accesso {permission} all’account del pacchetto {account} durante installazione o aggiornamento; altri account e file vengono conservati"
|
|
793
815
|
},
|
|
794
816
|
"nativeShare.createIntro": {
|
|
795
817
|
en: "This app creates the Shared Folder {name} and gives its package account {permission} access to it. If {name} already exists, it is kept and only the package account's permission is set. Uninstalling the app never deletes this Shared Folder or the files in it.",
|
|
@@ -62,5 +62,8 @@ export function resolveNativeInstallValues(manifest, provided, state) {
|
|
|
62
62
|
if (setting.required && !state.installed && !value)
|
|
63
63
|
return fail('DEPLOY_PARAM_REQUIRED', `Supply --param ${name}=<HTTPS origin>. SDK hooks validate it on the NAS.`);
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
const extraValues = { ...provided };
|
|
66
|
+
if (!state.installed && folder?.mode === "dedicated" && key && extraValues[key] === undefined)
|
|
67
|
+
extraValues[key] = folder.name;
|
|
68
|
+
return { ok: true, extraValues };
|
|
66
69
|
}
|
|
@@ -6,7 +6,7 @@ import { renderComposeDiagnosis } from "../build-spk/compose-diagnosis.js";
|
|
|
6
6
|
import { composeDaemon, renderComposeInstall } from "./compose.js";
|
|
7
7
|
import { renderBackgroundControl, renderBackgroundWorkerStart, renderBackgroundWorkerStop, renderUserManagerRecovery, backgroundUnitName, } from "./background.js";
|
|
8
8
|
import { renderPackagePostuninst } from "../build-spk/native-lifecycle.js";
|
|
9
|
-
import { renderSharedFolderScript } from "./shared-folder.js";
|
|
9
|
+
import { renderSharedFolderScript, renderSharedFolderPreparation } from "./shared-folder.js";
|
|
10
10
|
import { renderDelegateInstallDraft } from "../build-spk/delegate-scope.js";
|
|
11
11
|
import { renderPortalLifecycle } from "../portal/package.js";
|
|
12
12
|
import { nativePortal } from "./portal.js";
|
|
@@ -57,7 +57,7 @@ function renderStandaloneScriptInternal(name, manifest) {
|
|
|
57
57
|
daemon: manifest.identityGateway ? composeDaemon(manifest) : undefined,
|
|
58
58
|
};
|
|
59
59
|
const body = name === "preinst"
|
|
60
|
-
? renderComposeInstall(manifest.package)
|
|
60
|
+
? renderComposeInstall(manifest.package).replace("#!/bin/sh\n", () => "#!/bin/sh\n" + renderSharedFolderPreparation(manifest.sharedFolder))
|
|
61
61
|
: renderStandaloneScriptInternal(name, { ...native, appScripts: undefined });
|
|
62
62
|
const control = `"/var/packages/${manifest.package}/target/daemon/control"`;
|
|
63
63
|
const paths = `"\${SYNOPKG_PKGDEST:-/var/packages/${manifest.package}/target}" "\${SYNOPKG_PKGVAR:-/var/packages/${manifest.package}/var}"`;
|
|
@@ -5,7 +5,7 @@ import { type InstallWizardStep } from "../build-spk/install-wizard.js";
|
|
|
5
5
|
* `install.sharedFolder`: the Shared Folder a package keeps its files in.
|
|
6
6
|
*
|
|
7
7
|
* `dedicated`: DSM creates the declared name and grants exactly RO/RW. The
|
|
8
|
-
* wizard may select
|
|
8
|
+
* wizard may select a supported existing folder; DSM grants the declared access.
|
|
9
9
|
* `select`: an explicit existing folder, with the same field validation.
|
|
10
10
|
* `create`: a fixed DSM resource without an existing-folder option.
|
|
11
11
|
* Removing the package never deletes shared data.
|
|
@@ -27,6 +27,8 @@ export declare const SHARED_FOLDER_MARKER = "# synopkgland:install.sharedFolder
|
|
|
27
27
|
* so a moved folder keeps working. Runs as the package account.
|
|
28
28
|
*/
|
|
29
29
|
export declare function renderSharedFolderScript(pkg: string, folder: SharedFolder): string;
|
|
30
|
+
/** Adapt the wizard answer to the existing SDK preinst selection contract. */
|
|
31
|
+
export declare function renderSharedFolderPreparation(folder: SharedFolder | undefined): string;
|
|
30
32
|
/** `install_uifile` and `upgrade_uifile`, English plus one file per DSM language. */
|
|
31
33
|
export declare function renderSharedFolderWizardFiles(pkg: string, folder: SharedFolder): Record<string, string>;
|
|
32
34
|
/** The install wizard steps that ask for the shared folder, for static or dynamic wizards. */
|
|
@@ -38,7 +40,8 @@ export declare function renderSharedFolderUpgradeWizardFiles(pkg: string, folder
|
|
|
38
40
|
* administrator re-approves on every upgrade. Empty without either.
|
|
39
41
|
*/
|
|
40
42
|
export declare function renderUpgradeWizardFiles(pkg: string, folder: SharedFolder | undefined, integrations?: readonly string[]): Record<string, string>;
|
|
41
|
-
/**
|
|
43
|
+
/** DSM substitutes wizard values and grants only the declared package account.
|
|
44
|
+
* On upgrade, omitted values reuse DSM's saved installer variables. */
|
|
42
45
|
export declare function sharedFolderResource(pkg: string, folder: SharedFolder): Record<string, unknown> | undefined;
|
|
43
46
|
/** The declaration an SPK's postinst carries, or undefined when it has none or it is no longer valid. */
|
|
44
47
|
export declare function recoverSharedFolder(postinst: string | undefined): SharedFolder | undefined;
|
|
@@ -54,21 +54,17 @@ export function renderSharedFolderScript(pkg, folder) {
|
|
|
54
54
|
? `name='${folder.name}'`
|
|
55
55
|
: `name=""
|
|
56
56
|
${folder.mode === "dedicated" ? `if [ "\${SYNOPKG_PKG_STATUS:-}" = "UPGRADE" ] && [ "\${${key}+x}" != x ]; then exit 0; fi` : ""}
|
|
57
|
-
${folder.mode === "select" ? `if [ "\${SYNOPKG_PKG_STATUS:-}" = "UPGRADE" ] &&
|
|
57
|
+
${folder.mode === "select" ? `if [ "\${SYNOPKG_PKG_STATUS:-}" = "UPGRADE" ] && [ "\${${key}+x}" != x ]; then\n case "\${CHANGE_${key}:-}" in true|1|yes|on) echo "missing shared folder selection for ${key}" >&2; exit 1 ;; esac\n exit 0\nfi` : ""}
|
|
58
58
|
name="\${${key}:-${folder.mode === 'dedicated' ? folder.name : ''}}"
|
|
59
59
|
case "$name" in
|
|
60
60
|
''|*/*|*..*|@*|.*|*[[:cntrl:]]*|*'"'*|*'\\'*) echo "invalid shared folder name for ${key}" >&2; exit 1 ;;
|
|
61
61
|
esac`;
|
|
62
|
-
const gate = folder.mode === "create" ? "" : `change_enabled() {
|
|
63
|
-
case "$1" in true|1|yes|on) return 0 ;; *) return 1 ;; esac
|
|
64
|
-
}
|
|
65
|
-
`;
|
|
66
62
|
return `#!/bin/sh
|
|
67
63
|
${SHARED_FOLDER_MARKER}${JSON.stringify(folder)}
|
|
68
64
|
set -eu
|
|
69
65
|
PKGVAR="\${SYNOPKG_PKGVAR:-/var/packages/${pkg}/var}"
|
|
70
66
|
CONFIG="$PKGVAR/config.json"
|
|
71
|
-
${
|
|
67
|
+
${pick}
|
|
72
68
|
umask 077
|
|
73
69
|
mkdir -p "$PKGVAR"
|
|
74
70
|
tmp="$CONFIG.tmp.$$"
|
|
@@ -77,6 +73,24 @@ mv "$tmp" "$CONFIG"
|
|
|
77
73
|
exit 0
|
|
78
74
|
`;
|
|
79
75
|
}
|
|
76
|
+
/** Adapt the wizard answer to the existing SDK preinst selection contract. */
|
|
77
|
+
export function renderSharedFolderPreparation(folder) {
|
|
78
|
+
if (!folder || folder.mode !== "select")
|
|
79
|
+
return "";
|
|
80
|
+
const key = folder.key;
|
|
81
|
+
return `if [ "\${SYNOPKG_PKG_STATUS:-}" = UPGRADE ] && [ "\${${key}+x}" = x ]; then
|
|
82
|
+
CHANGE_${key}=true
|
|
83
|
+
export CHANGE_${key}
|
|
84
|
+
fi
|
|
85
|
+
`;
|
|
86
|
+
}
|
|
87
|
+
function validationMessages(t) {
|
|
88
|
+
return {
|
|
89
|
+
invalidName: t("nativeShare.selectionInvalid"),
|
|
90
|
+
unavailable: t("nativeShare.selectionUnavailable"),
|
|
91
|
+
unsupported: t("nativeShare.selectionUnsupported"),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
80
94
|
function intro(t, pkg, folder) {
|
|
81
95
|
const permission = t(`nativeShare.permission.${folder.permission}`);
|
|
82
96
|
return {
|
|
@@ -96,15 +110,13 @@ function installItems(t, pkg, folder) {
|
|
|
96
110
|
field.editable = true;
|
|
97
111
|
field.forceSelection = false;
|
|
98
112
|
}
|
|
99
|
-
field.validator = { allowBlank:
|
|
113
|
+
field.validator = { allowBlank: false, fn: existingShareValidator(validationMessages(t), false, folder.name) };
|
|
100
114
|
if (folder.mode === "dedicated")
|
|
101
115
|
picker.desc = t("nativeShare.optionalExisting", { name: folder.name });
|
|
102
116
|
return [intro(t, pkg, folder), picker];
|
|
103
117
|
}
|
|
104
|
-
/**
|
|
105
|
-
*
|
|
106
|
-
* switches shares; unchecked keeps the stored one and the picker may stay blank.
|
|
107
|
-
*/
|
|
118
|
+
/** Upgrade always submits the displayed selection, prefilled from config.json.
|
|
119
|
+
* A raw unconfirmed picker value must never diverge from the DSM resource grant. */
|
|
108
120
|
function upgradeItems(t, pkg, folder) {
|
|
109
121
|
if (folder.mode === "create")
|
|
110
122
|
return [intro(t, pkg, folder)];
|
|
@@ -112,22 +124,10 @@ function upgradeItems(t, pkg, folder) {
|
|
|
112
124
|
const items = installItems(t, pkg, folder);
|
|
113
125
|
const field = items[1].subitems[0];
|
|
114
126
|
field.defaultValue = "";
|
|
115
|
-
field.validator = { allowBlank: false, fn: existingShareValidator(
|
|
127
|
+
field.validator = { allowBlank: false, fn: existingShareValidator(validationMessages(t), false, folder.name) };
|
|
116
128
|
return items;
|
|
117
129
|
}
|
|
118
|
-
|
|
119
|
-
const picker = installItems(t, pkg, folder)[1];
|
|
120
|
-
const [subitem] = picker.subitems;
|
|
121
|
-
const { defaultValue: _unused, ...blankable } = subitem;
|
|
122
|
-
return [
|
|
123
|
-
intro(t, pkg, folder),
|
|
124
|
-
{
|
|
125
|
-
type: "multiselect",
|
|
126
|
-
desc: t("upgrade.changeDesc", { label }),
|
|
127
|
-
subitems: [{ key: `CHANGE_${folder.key}`, desc: t("upgrade.changeSub", { label }), defaultValue: false }],
|
|
128
|
-
},
|
|
129
|
-
{ ...picker, desc: t("upgrade.reuseDesc", { desc: String(picker.desc) }), subitems: [{ ...blankable, validator: { allowBlank: true, fn: existingShareValidator(pkg, folder.permission, t("nativeShare.selectionInvalid"), true) } }] },
|
|
130
|
-
];
|
|
130
|
+
return installItems(t, pkg, folder);
|
|
131
131
|
}
|
|
132
132
|
/** `install_uifile` and `upgrade_uifile`, English plus one file per DSM language. */
|
|
133
133
|
export function renderSharedFolderWizardFiles(pkg, folder) {
|
|
@@ -155,27 +155,27 @@ export function renderUpgradeWizardFiles(pkg, folder, integrations = []) {
|
|
|
155
155
|
...(folder ? [{ step_title: t("upgrade.step"), items: upgradeItems(t, pkg, folder) }] : []),
|
|
156
156
|
...integrationWizardSteps(t, integrations),
|
|
157
157
|
]);
|
|
158
|
-
if (folder
|
|
158
|
+
if (folder && folder.mode !== "create") {
|
|
159
159
|
for (const locale of LOCALES) {
|
|
160
160
|
const t = translator(locale);
|
|
161
161
|
const steps = [{ step_title: t("upgrade.step"), items: upgradeItems(t, pkg, folder) }, ...integrationWizardSteps(t, integrations)];
|
|
162
162
|
const field = steps[0].items[1].subitems[0];
|
|
163
163
|
field.defaultValue = "__SYNOPKGLAND_RETAINED_SHARE__";
|
|
164
164
|
const invalid = JSON.stringify(steps, null, 2).replace('"__SYNOPKGLAND_RETAINED_SHARE__"', '""');
|
|
165
|
-
field.validator = { allowBlank:
|
|
165
|
+
field.validator = { allowBlank: false, fn: existingShareValidator(validationMessages(t), false, folder.name) };
|
|
166
166
|
const retained = JSON.stringify(steps, null, 2);
|
|
167
167
|
const fresh = JSON.stringify([{ step_title: t("upgrade.step"), items: installItems(t, pkg, folder) }, ...integrationWizardSteps(t, integrations)], null, 2);
|
|
168
168
|
const name = locale === "en" ? "upgrade_uifile.sh" : `upgrade_uifile_${DSM_LANGS[locale]}.sh`;
|
|
169
|
-
files[name] =
|
|
169
|
+
files[name] = sharedFolderUpgradeScript(pkg, folder.key, retained, fresh, invalid);
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
return files;
|
|
173
173
|
}
|
|
174
|
-
/**
|
|
174
|
+
/** DSM substitutes wizard values and grants only the declared package account.
|
|
175
|
+
* On upgrade, omitted values reuse DSM's saved installer variables. */
|
|
175
176
|
export function sharedFolderResource(pkg, folder) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
return { shares: [{ name: folder.name, permission: { [folder.permission]: [pkg] } }] };
|
|
177
|
+
const name = folder.mode === "create" ? folder.name : `{{${folder.key}}}`;
|
|
178
|
+
return { shares: [{ name, permission: { [folder.permission]: [pkg] } }] };
|
|
179
179
|
}
|
|
180
180
|
/** The declaration an SPK's postinst carries, or undefined when it has none or it is no longer valid. */
|
|
181
181
|
export function recoverSharedFolder(postinst) {
|
|
@@ -189,7 +189,7 @@ export function recoverSharedFolder(postinst) {
|
|
|
189
189
|
return undefined;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function sharedFolderUpgradeScript(pkg, key, retained, fresh, invalid) {
|
|
193
193
|
return `#!/bin/sh
|
|
194
194
|
set -eu
|
|
195
195
|
config="\${SYNOPKG_PKGVAR:-/var/packages/${pkg}/var}/config.json"
|
|
@@ -206,7 +206,8 @@ else
|
|
|
206
206
|
${invalid}
|
|
207
207
|
SYNOPKGLAND_WIZARD
|
|
208
208
|
else
|
|
209
|
-
|
|
209
|
+
escaped=$(printf '%s' "$name" | sed 's/[&]/\\\\&/g')
|
|
210
|
+
cat <<'SYNOPKGLAND_WIZARD' | sed "s/__SYNOPKGLAND_RETAINED_SHARE__/$escaped/"
|
|
210
211
|
${retained}
|
|
211
212
|
SYNOPKGLAND_WIZARD
|
|
212
213
|
fi
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Shared data folders
|
|
2
|
+
|
|
3
|
+
```yaml
|
|
4
|
+
install:
|
|
5
|
+
sharedFolder:
|
|
6
|
+
mode: dedicated
|
|
7
|
+
key: media
|
|
8
|
+
name: ExampleApp
|
|
9
|
+
permission: ro
|
|
10
|
+
capabilities: {composeMounts: true}
|
|
11
|
+
compose:
|
|
12
|
+
shares:
|
|
13
|
+
media:
|
|
14
|
+
select: install
|
|
15
|
+
permission: ro
|
|
16
|
+
mounts: [{service: web, target: /media}]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use the app's package name for `name` (1–32 safe characters). The install wizard
|
|
20
|
+
prefills this dedicated name. Keep it to let DSM create or reuse that folder, or
|
|
21
|
+
select a supported existing share. A fresh install does not need an existing
|
|
22
|
+
package account or a permission grant prepared by an administrator.
|
|
23
|
+
|
|
24
|
+
Selecting a folder authorizes DSM's `data-share` worker to grant exactly the
|
|
25
|
+
manifest's RO or RW to the package account on installation, upgrade, repair and
|
|
26
|
+
subsequent starts. For selectable modes, `conf/resource` names `{{media}}` (the
|
|
27
|
+
declared wizard key); DSM substitutes the installer value. Other accounts'
|
|
28
|
+
permissions and the share's files are kept. The App never runs as root and does
|
|
29
|
+
not write ACLs.
|
|
30
|
+
|
|
31
|
+
The read-only field validator checks a valid non-system name and DSM folder
|
|
32
|
+
metadata. Supported shares are mounted local `/volumeN` folders using Windows
|
|
33
|
+
ACL. Mounted encrypted shares and local tiered/S2S data shares are allowed.
|
|
34
|
+
Unmounted encrypted, external USB/SATA, remote/cluster, C2, cold-storage, tiering
|
|
35
|
+
bucket, WORM, missing/offline, moving and forced-read-only replica shares are
|
|
36
|
+
unsupported. An unverified response blocks Next with a localized reason. The
|
|
37
|
+
validator never queries or requires the package account's existing permission.
|
|
38
|
+
Tiered/S2S support is based on local, mounted metadata; its name alone neither
|
|
39
|
+
rejects nor approves it. Device lifecycle acceptance covered ordinary local
|
|
40
|
+
shares; encrypted, tiered/S2S and special types have metadata fixture coverage.
|
|
41
|
+
|
|
42
|
+
Dynamic upgrades prefill the recorded folder and submit the displayed selection.
|
|
43
|
+
There is no separate change checkbox that could diverge from the worker's grant.
|
|
44
|
+
A malformed record or a static upgrade wizard requires an explicit valid choice.
|
|
45
|
+
Keep the dedicated name rather than clearing the field. No files are moved or
|
|
46
|
+
deleted when the selection changes. CLI deployment defaults a fresh dedicated
|
|
47
|
+
install to its declared name. To select or change a share explicitly, use
|
|
48
|
+
`--param media=Media` on install, or
|
|
49
|
+
`--param CHANGE_media=true --param media=OtherMedia` on upgrade/repair. Omitted
|
|
50
|
+
upgrade answers reuse DSM's saved installer variables; when migrating an older
|
|
51
|
+
installation without those values, explicitly submit the recorded folder.
|
|
52
|
+
|
|
53
|
+
`mode: create` creates a fixed folder without a picker. `mode: select` requires
|
|
54
|
+
an existing folder and uses the same DSM grant and validation. `key` and
|
|
55
|
+
`permission` must match `compose.shares`; host paths are never wizard answers.
|
|
56
|
+
The package-account preinst still refuses missing, ambiguous or symlinked
|
|
57
|
+
existing sources. The dedicated default alone may be materialized on DSM's
|
|
58
|
+
selected package volume before the worker creates it.
|
|
59
|
+
|
|
60
|
+
Runtime preflight checks current kernel access as the package account before
|
|
61
|
+
starting containers. Revoked access reports the folder, account and required
|
|
62
|
+
RO/RW, with grant-or-reinstall recovery in the localized DSM hook log. Repair
|
|
63
|
+
with the selected folder lets DSM grant access again. Folder metadata cannot
|
|
64
|
+
guarantee child ACLs, future changes or recall already-open file descriptors.
|
|
65
|
+
|
|
66
|
+
## Uninstall and old selections
|
|
67
|
+
|
|
68
|
+
DSM's `data-share` Release does nothing: uninstall retains the shared folder,
|
|
69
|
+
its files, and the package account's ACL, including on user-chosen shares. A
|
|
70
|
+
previous selection's ACL can also remain after switching folders. Package removal
|
|
71
|
+
does not prove that the account or its permissions were removed. This native
|
|
72
|
+
retention is intentional here; no privileged App cleanup or manual ACL writer
|
|
73
|
+
is generated.
|
|
74
|
+
|
|
75
|
+
To revoke a retained permission, an administrator opens **Control Panel > Shared
|
|
76
|
+
Folder > the selected folder > Edit > Permissions > System internal user**, finds
|
|
77
|
+
the package account, clears its Read only/Read/Write permission and saves. Leave
|
|
78
|
+
other accounts' rows and the folder's files intact. Check old selections too.
|
|
79
|
+
Stop the package before revoking access if active streams must end.
|
|
80
|
+
|
|
81
|
+
DSM sources: [Data Share resource](https://help.synology.com/developer-guide/resource_acquisition/data_share.html)
|
|
82
|
+
for acquisition, existing shares and Release behavior; [resource specification](https://help.synology.com/developer-guide/resource_acquisition/resource_specification.html)
|
|
83
|
+
and the official developer guide's Data from Wizard section for `{{key}}`
|
|
84
|
+
substitution. Device acceptance additionally verified first-install grants,
|
|
85
|
+
upgrade switching, same-version reinstallation after revocation and retained
|
|
86
|
+
files/ACLs after uninstall.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.1",
|
|
4
4
|
"description": "Syno Package Land Developer Kit CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -15,13 +15,14 @@
|
|
|
15
15
|
"CHANGELOG.md",
|
|
16
16
|
"schema",
|
|
17
17
|
"docs/ctl-external.md",
|
|
18
|
-
"skills"
|
|
18
|
+
"skills",
|
|
19
|
+
"docs/shared-folders.md"
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build": "rm -rf dist && tsc",
|
|
22
23
|
"test": "npm run build && node --import tsx --test --test-concurrency=${SYNOPKGLAND_GATE_JOBS:-3} test/*.test.ts test/ctl/*.test.ts",
|
|
23
24
|
"test:glossary": "node --test scripts/test/glossary-drift.test.mjs",
|
|
24
|
-
"test:scripts": "node --test scripts/test/gate.test.mjs scripts/test/release.test.mjs scripts/test/pack-docker.test.mjs scripts/test/npm-pack.test.mjs scripts/test/executor-bump.test.mjs scripts/test/smoke-exports.test.mjs scripts/test/parallel.test.mjs scripts/test/scaffold-matrix.test.mjs scripts/test/frontend-deps.test.mjs scripts/test/docker-gate.test.mjs scripts/test/gate-plan.test.mjs scripts/test/gates.test.mjs",
|
|
25
|
+
"test:scripts": "node --test scripts/test/gate.test.mjs scripts/test/release.test.mjs scripts/test/pack-docker.test.mjs scripts/test/npm-pack.test.mjs scripts/test/executor-bump.test.mjs scripts/test/smoke-exports.test.mjs scripts/test/parallel.test.mjs scripts/test/scaffold-matrix.test.mjs scripts/test/frontend-deps.test.mjs scripts/test/docker-gate.test.mjs scripts/test/gate-plan.test.mjs scripts/test/gates.test.mjs && python3 scripts/test/npm-publish.py",
|
|
25
26
|
"gates": "bash scripts/ci/gates.sh",
|
|
26
27
|
"gates:fast": "bash scripts/ci/gates.sh --fast",
|
|
27
28
|
"prepublishOnly": "npm run build"
|
package/skills/SKILL.md
CHANGED
|
@@ -26,6 +26,8 @@ Use this guide to initialize, build and inspect own applications or upstream OSS
|
|
|
26
26
|
|
|
27
27
|
For an existing open-source App, first read [reference/upstream-fork.md](reference/upstream-fork.md): upstream fork/history + untouched upstream files + all packaging in `synology/`, official container images pinned by tag/index digest, native official release binaries pinned by SHA-256 or a source build hook, and a single tag-merge upgrade command. Use `init --upstream-fork`; never rewrite the App as a component. Integrated upstream Apps require direct DSM administrator entry without a separate App password or an OIDC/SSO server: supported trusted headers first, disabling native login second; the shipped OpenList pattern uses the existing SDK 0.17.3 token adapter (`mode: token`, `access: dsm-admins`, `entry: admin-only`) with server-side Authorization injection. All DSM admins share one upstream admin; token reset requires package restart; WebDAV retains its native credentials.
|
|
28
28
|
|
|
29
|
+
Shared-folder selection authorizes DSM `data-share` to grant the manifest's RO/RW on install, upgrade and repair; never require package-account access before installation. Validate only names and supported mounted local folder types. Uninstall retains the folder, data and package account's ACL; administrator revocation uses Control Panel > Shared Folder > Edit > Permissions > System internal user. See [reference/install.md](reference/install.md).
|
|
30
|
+
|
|
29
31
|
Use SDK/App 0.38.6 and CLI 0.41.12 for App entry enforcement. Declare every App method
|
|
30
32
|
in the permissions table; dynamic names and unregistered HTTP dispatchers are rejected.
|
|
31
33
|
Use fixed SDK routes and `identity_gateway.upstream_auth_paths` for client API
|
|
@@ -162,20 +162,29 @@ ambiguous or symlinked sources fail installation. Host paths are never wizard
|
|
|
162
162
|
answers. Every mounted service uses the fixed package UID:GID, drops all Linux
|
|
163
163
|
capabilities and has no-new-privileges. Container-root cannot mount Shares.
|
|
164
164
|
|
|
165
|
-
DSM
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
165
|
+
DSM grants the declared RO/RW to the package account on the selected share through
|
|
166
|
+
`data-share`, creating the dedicated App-named folder when needed. Choosing an
|
|
167
|
+
existing share authorizes that grant; the account need not exist before install.
|
|
168
|
+
The localized field validates the name, existence and supported mounted local
|
|
169
|
+
folder type, without querying package-account permissions. Local tiered/S2S data
|
|
170
|
+
shares are allowed; remote/C2, tiering buckets, WORM, unmounted, unavailable,
|
|
171
|
+
moving, external and forced-read-only shares are refused. The SDK checks kernel
|
|
172
|
+
access before startup and reports the share, required permission and recovery
|
|
173
|
+
action if access was revoked. No App root process or manual ACL writer is used.
|
|
174
|
+
See [install.md](install.md).
|
|
175
|
+
|
|
176
|
+
The upgrade wizard prefills the saved folder and submits the displayed selection,
|
|
177
|
+
without a separate change checkbox. CLI deployment uses `--param media=Media` on
|
|
178
|
+
first install, and `--param CHANGE_media=true --param media=OtherMedia` to change
|
|
179
|
+
it on upgrade/repair. For older installations without saved DSM installer values,
|
|
180
|
+
explicitly submit the recorded folder. A moved share needs a new upgrade to
|
|
181
|
+
resolve its volume path; start does not rematerialize the bind.
|
|
182
|
+
|
|
183
|
+
Stop/disable and uninstall use DSM's official project worker. Uninstall retains
|
|
184
|
+
the source share, its files and the package account's ACL; data-share Release
|
|
185
|
+
does nothing, and old selections may retain their grant too. An administrator
|
|
186
|
+
can revoke just that account's permission in Control Panel > Shared Folder >
|
|
187
|
+
Edit > Permissions > System internal user. Preserve other accounts and data.
|
|
179
188
|
|
|
180
189
|
ACL changes affect subsequent filesystem operations. Already-open file
|
|
181
190
|
descriptors and data already read are not recalled. To stop existing streams,
|
|
@@ -87,7 +87,7 @@ sweep forward the cancel instead of admitting it.
|
|
|
87
87
|
|
|
88
88
|
容器使用固定 DSM run-as 使用者與掛載,不代表瀏覽器本人 ACL。容器路徑依 Compose/映像的 upstream target,保留 target、ro/rw,只替換 host source;管理員在安裝時選擇 Share(共用資料夾)。不要對既有資料 chown。App Data 使用 package var;共用資料夾與 named volume 分別備份。`posix_all_shares` 僅為部署時快照,不會自動加入新資料夾。
|
|
89
89
|
|
|
90
|
-
`install.sharedFolder` 預設使用 `mode: dedicated` 與
|
|
90
|
+
`install.sharedFolder` 預設使用 `mode: dedicated` 與 App 名稱;選擇既有共用資料夾即授權 DSM data-share 在安裝、升級/修復時授予套件帳號宣告的 RO/RW,不要求帳號或權限預先存在。Wizard 只驗證名稱、存在與支援的本機已掛載類型;SDK 啟動仍檢查核心權限並提供復原指引。這不是逐使用者 session access;詳見 [install.md](install.md)。移除不刪共用資料夾或資料,DSM 也會保留套件帳號 ACL(舊選擇亦同);管理員可在「控制台 > 共用資料夾 > 編輯 > 權限 > 系統內部使用者」清除該帳號的 RO/RW,保留其他權限與資料。Delete App Data 不是完整清理證明,須讀回殘留。
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
### Install-selected scope and the destination API
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Native installation settings
|
|
2
2
|
|
|
3
|
-
Use
|
|
3
|
+
Use CLI 0.47.1 with the existing supported SDK/App and templates pins. Configure installation through the manifest and generated wizard; do not add App ACL writers, root hooks or independent port state.
|
|
4
4
|
|
|
5
5
|
```yaml
|
|
6
6
|
install:
|
|
@@ -15,7 +15,11 @@ identity_gateway:
|
|
|
15
15
|
listen: {https: 28443}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
For every App needing shared data, name the dedicated share after the package. DSM's `data-share`
|
|
18
|
+
For every App needing shared data, name the dedicated share after the package. The wizard defaults to that name and also accepts a supported existing share. Selecting a folder authorizes DSM's `data-share` worker to grant the declared RO/RW to the package account on install, upgrade/repair and starts. No pre-existing account or permission grant is required. Validation checks the name, existence and supported local mounted folder type, never package-account access. Local tiered/S2S shares are accepted; remote/C2, tiering buckets, WORM, unmounted, unavailable, moving, external and forced-read-only shares are refused. Runtime kernel checks still report the share, required access and recovery action when permission is revoked. No App root or ACL writer is generated.
|
|
19
|
+
|
|
20
|
+
The upgrade wizard prefills and submits the recorded folder without a separate change checkbox. Keep the dedicated name rather than clearing it. CLI automation uses `--param media=Media` on install and `--param CHANGE_media=true --param media=OtherMedia` to change it on upgrade/repair. Explicitly submit the saved folder when migrating older installations without saved DSM installer values.
|
|
21
|
+
|
|
22
|
+
Uninstall retains the share, files and package account's ACL because DSM data-share Release does nothing. Old selected shares can retain that ACL too. To revoke it, an administrator opens Control Panel > Shared Folder > the folder > Edit > Permissions > System internal user, clears the package account's Read only/Read/Write permission and saves, preserving other rows and data. See [shared-folder behavior](../../docs/shared-folders.md).
|
|
19
23
|
|
|
20
24
|
Port fields default to declared gateway HTTP/HTTPS and local OIDC listener ports. Validation refuses noncanonical numbers, values outside 1024–65535, reserved DSM/discovery ports, duplicates and conflicts from DSM's `SYNO.Core.Service.PortInfo` inventory. Missing or malformed inventory blocks Next. The package-account controller repeats the native service conflict check and materializes gateway, nginx, launcher, daemon and `.sc` port-config data from the selected values.
|
|
21
25
|
|