Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: failed to save default config file #1445

Open
pythoninthegrass opened this issue Dec 10, 2024 · 5 comments
Open

fix: failed to save default config file #1445

pythoninthegrass opened this issue Dec 10, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@pythoninthegrass
Copy link

Describe the bug
Permissions aren't correctly being set via the macos install instructions.

To Reproduce

  • (curl -sf -L https://download.daytona.io/daytona/install.sh | sudo bash) && daytona server -y && daytona

Expected behavior
Should automatically setup directories and install any nested binaries under the ~/Library/Application Support/daytona directory.

Screenshots

λ (curl -sf -L https://download.daytona.io/daytona/install.sh | sudo bash) && daytona server -y && daytona
Password:
Installing Daytona...

Default installation directory: /usr/local/bin
You can override this by setting the DAYTONA_PATH environment variable (ie. `| DAYTONA_PATH=/home/user/bin bash`)

Downloading Daytona binary from https://download.daytona.io/daytona/latest/daytona-darwin-arm64
[⠸] Downloading... [########################################] 100%

Installing server to /usr/local/bin
Daytona has been successfully installed to /usr/local/bin!
INFO[0000] Using default FRPS config
FATA[0000] failed to save default config file: mkdir /Users/lance.stephens/Library/Application Support/daytona/server: permission denied

Desktop (please complete the following information):

  • OS: macOS 14.7.1 (23H222)
  • Daytona Version: v0.48.0

Additional context
Seems like however the daytona bin is setting permissions it's missing the basics. Should be as simple as

sudo mkdir -p ~/Library/Application\ Support/daytona/{server/binaries,providers} \
&& sudo chown -R $(whoami) ~/Library/Application\ Support/daytona

Removing botched installs is also a royal pain. First impressions are everything and this wasn't a good one. At least not on macOS.

@pythoninthegrass pythoninthegrass added the bug Something isn't working label Dec 10, 2024
@Tpuljak
Copy link
Member

Tpuljak commented Dec 11, 2024

Hi @pythoninthegrass,

I'm sorry you had a bad first experience with the installation.

Could you please post the result of cat ~/Library/LaunchAgents/DaytonaServerDaemon.plist?
The daemon should be started under privileges of your user which should have write access to the ~/Library/Application Support dir but something might've gone wrong.

I can't seem to reproduce this on my Mac.

@pythoninthegrass
Copy link
Author

Sure thing!:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Disabled</key>
	<false/>
	<key>EnvironmentVariables</key>
	<dict>
		<key>ASDF_DIR</key>
		<string>/Users/lance.stephens/.asdf</string>
		<key>ASDF_GOLANG_MOD_VERSION_ENABLED</key>
		<string>true</string>
		<key>AWS_DEFAULT_PROFILE</key>
		<string>dev.use1</string>
		<key>AWS_VAULT_PROMPT</key>
		<string>terminal</string>
		<key>BASH_SILENCE_DEPRECATION_WARNING</key>
		<string>1</string>
		<key>BLOCKSIZE</key>
		<string>1k</string>
		<key>BUN</key>
		<string>/Users/lance.stephens/.bun/bin</string>
		<key>BUN_INSTALL</key>
		<string>/Users/lance.stephens/.bun</string>
		<key>COLORFGBG</key>
		<string>15;0</string>
		<key>COLORTERM</key>
		<string>truecolor</string>
		<key>COMMAND_MODE</key>
		<string>unix2003</string>
		<key>DISPLAY</key>
		<string>/private/tmp/com.apple.launchd.YrkjyV9qnc/org.xquartz:0</string>
		<key>DOCKER_HOST</key>
		<string>unix:///Users/lance.stephens/.orbstack/run/docker.sock</string>
		<key>EDITOR</key>
		<string>vim</string>
		<key>GEM_HOME</key>
		<string>/Users/lance.stephens/gems</string>
		<key>GOCACHE</key>
		<string>/Users/lance.stephens/go/cache</string>
		<key>GOPATH</key>
		<string>/Users/lance.stephens/.asdf/shims</string>
		<key>GOPROXY</key>
		<string>https://proxy.golang.org,direct</string>
		<key>GOROOT</key>
		<string>/Users/lance.stephens/.asdf/installs/golang/1.23.4/go</string>
		<key>HOME</key>
		<string>/Users/lance.stephens</string>
		<key>HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK</key>
		<string>1</string>
		<key>HOMEBREW_NO_INSTALL_CLEANUP</key>
		<string>1</string>
		<key>INFISICAL_API_URL</key>
		<string>http://infisical.wpai.local:8080</string>
		<key>INFISICAL_DISABLE_UPDATE_CHECK</key>
		<string>true</string>
		<key>ITERM_PROFILE</key>
		<string></string>
		<key>ITERM_SESSION_ID</key>
		<string>w0t3p1:F6CFD5B7-C595-4182-8135-4AD28E3F0BA0</string>
		<key>KREW_ROOT</key>
		<string>/Users/lance.stephens/.krew</string>
		<key>KUBECONFIG</key>
		<string>/Users/lance.stephens/.kube/config:/Users/lance.stephens/.kube/k3s.yml:/Users/lance.stephens/.kube/minikube.yml</string>
		<key>LANG</key>
		<string>en_US.UTF-8</string>
		<key>LC_ALL</key>
		<string>en_US.UTF-8</string>
		<key>LC_TERMINAL</key>
		<string>iTerm2</string>
		<key>LC_TERMINAL_VERSION</key>
		<string>3.5.5</string>
		<key>LOGNAME</key>
		<string>lance.stephens</string>
		<key>MAGICK_HOME</key>
		<string>/opt/homebrew/opt/imagemagick@6</string>
		<key>MAKEFLAGS</key>
		<string>--jobs 10</string>
		<key>MANPAGER</key>
		<string>sh -c &#39;col -bx | bat -l man -p&#39;</string>
		<key>MODULAR_BIN</key>
		<string>/Users/lance.stephens/.modular/bin</string>
		<key>MODULAR_HOME</key>
		<string>/Users/lance.stephens/.modular</string>
		<key>NIX_PROFILES</key>
		<string>/nix/var/nix/profiles/default /Users/lance.stephens/.nix-profile</string>
		<key>NIX_SSL_CERT_FILE</key>
		<string>/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt</string>
		<key>NPM_GLOBAL</key>
		<string>/Users/lance.stephens/.npm-global/bin</string>
		<key>N_PREFIX</key>
		<string>/Users/lance.stephens/.n</string>
		<key>PATH</key>
		<string>/Users/lance.stephens/.asdf/shims:/Users/lance.stephens/.asdf/bin:/Users/lance.stephens/.local/bin:/Users/lance.stephens/.cargo/bin:/Users/lance.stephens/.linuxbrew/bin:/Users/lance.stephens/.asdf/shims/bin:/Users/lance.stephens/.cargo/bin:/Users/lance.stephens/.modular/bin:/Users/lance.stephens/.bun/bin:/Users/lance.stephens/.local/bin:/opt/homebrew/bin:/Users/lance.stephens/.rd/bin:/Users/lance.stephens/.krew/bin:/Users/lance.stephens/gems/bin:/Users/lance.stephens/.n/bin:/usr/local/opt/gnu-getopt/bin:/usr/local/bin:/usr/local:/usr/local/sbin:/Users/lance.stephens/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/lance.stephens/.deno/bin:/Users/lance.stephens/.linuxbrew/bin:/Users/lance.stephens/.asdf/shims/bin:/Users/lance.stephens/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/System/Cryptexes/App/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/Applications/iTerm.app/Contents/Resources/utilities:/opt/homebrew/opt/fzf/bin:/Users/lance.stephens/.orbstack/bin</string>
		<key>PIPX_DEFAULT_PYTHON</key>
		<string>/Users/lance.stephens/.asdf/shims/python</string>
		<key>PWD</key>
		<string>/Users/lance.stephens</string>
		<key>PYTHONSTARTUP</key>
		<string>/Users/lance.stephens/.config/startup.py</string>
		<key>QUIC_GO_DISABLE_ECN</key>
		<string>true</string>
		<key>QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING</key>
		<string>true</string>
		<key>RUSTFLAGS</key>
		<string>-C link-arg=-fuse-ld=ld</string>
		<key>RUST_WITHOUT</key>
		<string>rust-docs</string>
		<key>SHELL</key>
		<string>/opt/homebrew/bin/bash</string>
		<key>SHLVL</key>
		<string>1</string>
		<key>SSH_AUTH_SOCK</key>
		<string>/private/tmp/com.apple.launchd.bsWt7Nymgj/Listeners</string>
		<key>STARSHIP_SESSION_KEY</key>
		<string>4352447510057243</string>
		<key>STARSHIP_SHELL</key>
		<string>bash</string>
		<key>TERM</key>
		<string>xterm-256color</string>
		<key>TERMINFO_DIRS</key>
		<string>/Applications/iTerm.app/Contents/Resources/terminfo:/usr/share/terminfo</string>
		<key>TERM_FEATURES</key>
		<string>T3CwLrMSc7UUw9Ts3BFGsSyHNoSxF</string>
		<key>TERM_PROGRAM</key>
		<string>iTerm.app</string>
		<key>TERM_PROGRAM_VERSION</key>
		<string>3.5.5</string>
		<key>TERM_SESSION_ID</key>
		<string>w0t3p1:F6CFD5B7-C595-4182-8135-4AD28E3F0BA0</string>
		<key>THEFUCK_REQUIRE_CONFIRMATION</key>
		<string>false</string>
		<key>THEFUCK_RULES</key>
		<string>sudo:no_command</string>
		<key>TMPDIR</key>
		<string>/var/folders/8p/cpd9x7_j27j1qvq_w647fq9c0000gn/T/</string>
		<key>USER</key>
		<string>lance.stephens</string>
		<key>UV_HTTP_TIMEOUT</key>
		<string>60</string>
		<key>XDG_DATA_DIRS</key>
		<string>/usr/local/share:/usr/share:/Users/lance.stephens/.nix-profile/share:/nix/var/nix/profiles/default/share</string>
		<key>XPC_FLAGS</key>
		<string>0x0</string>
		<key>XPC_SERVICE_NAME</key>
		<string>0</string>
		<key>_</key>
		<string>/Users/lance.stephens/.local/bin/daytona</string>
		<key>__CFBundleIdentifier</key>
		<string>com.googlecode.iterm2</string>
		<key>__CF_USER_TEXT_ENCODING</key>
		<string>0x1F5:0x0:0x0</string>
	</dict>
	<key>KeepAlive</key>
	<true/>
	<key>Label</key>
	<string>DaytonaServerDaemon</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Users/lance.stephens/.local/bin/daytona</string>
		<string>daemon-serve</string>
	</array>
	<key>RunAtLoad</key>
	<false/>
	<key>SessionCreate</key>
	<false/>
	<key>StandardErrorPath</key>
	<string>/Users/lance.stephens/DaytonaServerDaemon.err.log</string>
	<key>StandardOutPath</key>
	<string>/Users/lance.stephens/DaytonaServerDaemon.out.log</string>
</dict>
</plist>

@hainguyents13
Copy link

same issue

@Tpuljak
Copy link
Member

Tpuljak commented Dec 16, 2024

@pythoninthegrass what's the output of ls -altd ~/Library/Application\ Support?

I have practically the exact same daemon config and everything seems fine. The only thing that comes to mind is that the directory has wrong ownership

@pythoninthegrass
Copy link
Author

Hi @Tpuljak! Been on holiday so not in front of my work computer. I'll circle back the week of January 6th.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants