Skip to content

[Bug]: Atuin doesn't work on read-only filesystem #2999

@Ram-Z

Description

@Ram-Z

What did you expect to happen?

When the filesystem the database is located on is read-only, I'd expect atuin to still be able to show the history and search through.

Obviously no writes to the database can happen and eventually an error should be raised, but it would be really great if at least it were useable.

A suggestion would be to first open the database read-only, and only switch/repoen to write mode when required.

What happened?

It fails to open entirely with the message "(code: 14) unable to open database file", no history can be shown or searched.

Error: error returned from database: (code: 14) unable to open database file

Caused by:
    (code: 14) unable to open database file

Location:
    crates/atuin/src/command/client/history.rs:673:18

Atuin doctor output

Error is emitted here too.

Error: error returned from database: (code: 14) unable to open database file

Caused by:
    (code: 14) unable to open database file

Location:
    crates/atuin/src/command/client/history.rs:673:18


Atuin Doctor
Checking for diagnostics


Please include the output below with any bug reports or issues

{
  "atuin": {
    "version": "18.10.0",
    "commit": "NO_GIT",
    "sync": null,
    "sqlite_version": "3.46.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Arch Linux",
    "arch": "x86_64",
    "version": "rolling",
    "disks": [
      {
        "name": "/dev/nvme0n1p2",
        "filesystem": "btrfs"
      },
      {
        "name": "systemd-1",
        "filesystem": "autofs"
      },
      {
        "name": "systemd-1",
        "filesystem": "autofs"
      },
      {
        "name": "systemd-1",
        "filesystem": "autofs"
      },
      {
        "name": "systemd-1",
        "filesystem": "autofs"
      },
      {
        "name": "systemd-1",
        "filesystem": "autofs"
      },
      {
        "name": "/dev/nvme0n1p1",
        "filesystem": "vfat"
      },
      {
        "name": "/dev/mapper/home_ramsi",
        "filesystem": "btrfs"
      }
    ]
  }
}

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions