From 732e5aca1135aa28b03b15d5bd032d63e3da4697 Mon Sep 17 00:00:00 2001 From: "othman.suseno" Date: Mon, 15 Dec 2025 02:01:09 +0700 Subject: [PATCH] fix user permission issue --- install.sh | 20 +++++++++++++++++++- internal/zfs/service.go | 22 +++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 3093362..7d3b15d 100755 --- a/install.sh +++ b/install.sh @@ -176,6 +176,22 @@ create_user() { else echo -e "${YELLOW}User $SERVICE_USER already exists${NC}" fi + + # Add user to disk group for block device access (required for ZFS) + if getent group disk > /dev/null 2>&1; then + usermod -a -G disk "$SERVICE_USER" + echo -e "${GREEN}Added $SERVICE_USER to disk group${NC}" + fi + + # Create sudoers configuration for ZFS commands + echo -e "${GREEN}Configuring sudo for ZFS operations...${NC}" + cat > /etc/sudoers.d/atlas-zfs <