8000 install.sh: ~/Applications가 root 소유일 때 ditto Permission denied로 설치 실패 · Issue #1 · gomjellie/DuoKeyboard · GitHub
[go: up one dir, main page]

Skip to content

install.sh: ~/Applications가 root 소유일 때 ditto Permission denied로 설치 실패 #1

Open

Description

@elon-jiwon

증상

curl -fsSL https://gomjellie.github.io/DuoKeyboard/install.sh | zsh 실행 시
ditto: ... Permission denied 에러가 나면서 설치가 실패합니다.

원인

~/Applications 폴더가 이미 존재하는데 소유자가 root였습니다
(예전에 다른 설치 프로그램이 sudo로 만든 것으로 보입니다).

drwxr-xr-x  2 root  staff  64  ~/Applications

mkdir -p는 폴더가 이미 있으니 통과하고, rm -rf도 지울 Duo.app이 없어 통과한 뒤,
ditto "$tmp/Duo.app" "$APP_DIR/Duo.app"에서 쓰기 권한이 없어 실패합니다.
에러 메시지만으로는 원인을 알기 어려웠습니다.

해결 (사용자 측)

sudo chown "$USER":staff ~/Applications

이후 스크립트를 다시 실행하면 정상 설치됩니다.

제안

mkdir -p "$APP_DIR" 다음에 쓰기 권한을 확인해서 안내 메시지를 보여주면 좋을 것 같습니다.

if [[ ! -w "$APP_DIR" ]]; then
  echo "$APP_DIR 폴더에 쓸 수 없어요 (소유자: $(stat -f %Su "$APP_DIR"))." >&2
  echo "다음 명령으로 고친 뒤 다시 실행해 주세요: sudo chown \"$USER\":staff \"$APP_DIR\"" >&2
  exit 1
fi

환경

  • macOS 26.6.2
  • Duo 1.0.0 (5)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0