install-service: grant venv base interpreter (pyvenv.cfg home) outside COMFY_DIR

This commit is contained in:
mram
2026-09-21 22:19:08 +02:00
parent 2d5be72436
commit b55d548c5f
4 changed files with 97 additions and 2 deletions
+8 -1
View File
@@ -375,6 +375,13 @@ func grantAll(exe, configPath string) error {
if err := grantAccessTree(comfyDir, "(OI)(CI)(M)"); err != nil {
return err
}
// uv venvs (Comfy-Desktop) redirect to a base interpreter that
// can live outside COMFY_DIR; read+execute suffices for it.
if home := comfyVenvHome(comfyDir); home != "" {
if err := grantAccessTree(home, "(OI)(CI)(RX)"); err != nil {
return err
}
}
}
}
return nil
@@ -496,7 +503,7 @@ func grantAccessTree(path, perms string) error {
func runIcacls(path, perms string, recursive bool) error {
args := []string{path, "/grant", virtualAccount + ":" + perms}
if recursive {
fmt.Printf("granting %s modify access to %s (large trees can take minutes)\n", virtualAccount, path)
fmt.Printf("granting %s %s access to %s (large trees can take minutes)\n", virtualAccount, perms, path)
args = append(args, "/T")
}
start := time.Now()