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

[Bug]: Symlinks not support for server config #2456

Open
axelson opened this issue Nov 23, 2024 · 0 comments
Open

[Bug]: Symlinks not support for server config #2456

axelson opened this issue Nov 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@axelson
Copy link

axelson commented Nov 23, 2024

What did you expect to happen?

I manage my system configuration by keeping my configuration files in a git repo inside /home/myuser/config. So I tried setting up /etc/atuin as a symlink to /home/myuser/config/atuin-server

Note: my server is setup with systemd: https://docs.atuin.sh/self-hosting/systemd/

What happened?

I got various errors (I initially tried symlinking the entire /etc/atuin folder but I also tried only symlinking the /etc/atuin/server.toml file)

Error when /etc/atuin is a symlink:

Nov 23 07:10:24 axelsonserver atuin[138457]: Error: could not load server settings                                                                                                                               
Nov 23 07:10:24 axelsonserver atuin[138457]: Caused by:                                                                                                                                                          
Nov 23 07:10:24 axelsonserver atuin[138457]:    0: failed to create directory `/etc/atuin`                                                                                                                       
Nov 23 07:10:24 axelsonserver atuin[138457]:    1: File exists (os error 17)                                                                                                                                     
Nov 23 07:10:24 axelsonserver atuin[138457]: Location:                                                                                                                                                           
Nov 23 07:10:24 axelsonserver atuin[138457]:     /home/runner/work/atuin/atuin/crates/atuin-server/src/settings.rs:86:13                                                                                         
Nov 23 07:10:24 axelsonserver systemd[1]: atuin-server.service: Main process exited, code=exited, status=1/FAILURE

Error when /etc/atuin/server.toml is a symlink:

Nov 23 07:14:22 axelsonserver atuin[143588]: Error: could not load server settings                                                                                                                               
Nov 23 07:14:22 axelsonserver atuin[143588]: Caused by:                                                                                                                                                          
Nov 23 07:14:22 axelsonserver atuin[143588]:    0: failed to create file `/etc/atuin/server.toml`                                                                                                                
Nov 23 07:14:22 axelsonserver atuin[143588]:    1: Permission denied (os error 13)                                                                                                                               
Nov 23 07:14:22 axelsonserver atuin[143588]: Location:                                                                                                                                                           
Nov 23 07:14:22 axelsonserver atuin[143588]:     /home/runner/work/atuin/atuin/crates/atuin-server/src/settings.rs:87:28                                                                                         
Nov 23 07:14:22 axelsonserver systemd[1]: atuin-server.service: Main process exited, code=exited, status=1/FAILURE  

Instead I'd expect to not get an error in either case

Atuin doctor output

{
  "atuin": {
    "version": "18.3.0",
    "sync": null,
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "fish",
    "default": "fish",
    "plugins": [],
    "preexec": null
  },
  "system": {
    "os": "Ubuntu",
    "arch": "x86_64",
    "version": "22.04",
    "disks": [
      {
        "name": "/dev/sda2",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/sda2",
        "filesystem": "ext4"
      }
    ]
  }
}


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@axelson axelson added the bug Something isn't working label Nov 23, 2024
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

1 participant