https://linen.dev logo
cargo-shuttle command panics with permission denie...
# help
g
Hello, apologies in advance if this is due to a silly oversight on my part, but after running
cargo install cargo-shuttle
I can't run any commands, including
cargo shuttle help
, without getting the following error:
Copy code
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Permission denied (os error 13)', /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-shuttle-0.6.0/src/lib.rs:48:49
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
   2: core::result::unwrap_failed
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5
   3: <cargo_shuttle::Shuttle as core::default::Default>::default
   4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
   5: std::thread::local::LocalKey<T>::with
   6: tokio::park::thread::CachedParkThread::block_on
   7: tokio::runtime::thread_pool::ThreadPool::block_on
   8: tokio::runtime::Runtime::block_on
   9: cargo_shuttle::main
I'm running this in a docker container, which hasn't caused any issues thus far but just in case that ends up being relevant. EDIT: Running
sudo $(which cargo-shuttle)
seems to be a workaround, albeit not ideal... until I try using project subcommands
s
Hey 👋 , which docker image are you using?
Also, was shuttle installed with sudo perhaps?
g
Ahh, I think I might've figured out the issue! I was mounting my home config directory, and that ended up making it owned by root, so the cargo-shuttle command probably couldn't make its own config file 😅
A pretty atypical situation, so you can probably ignore this, but it might be helpful to explain that the config file couldn't be opened instead of unwrapping 😭
s
Ah I see, yes this is a great suggestion! I've created a ticket for us to fix this
... out of interest, the config management (which does the file unwrap) is about the last PoC code we have to rewrite 🥳
g
Oh wonderful! Again, a rather niche error, but never hurts to get rid of unwraps I suppose!