[GH-ISSUE #27] Failed to save authentication key file #26

Open
opened 2026-03-02 23:01:50 +03:00 by kerem · 6 comments
Owner

Originally created by @bbros-dev on GitHub (Oct 14, 2020).
Original GitHub issue: https://github.com/agrinman/tunnelto/issues/27

I have a subscription with 5 subdomains set, and use the provided key in the following command.
Running the following as sudo succeeds. However, run as the ordinary user:

tunnelto set-auth --key <redacted>

Produces this error report:

name = 'tunnelto'
operating_system = 'unix:Ubuntu'
crate_version = '0.1.12'
explanation = '''
Panic occurred in file 'tunnelto/src/config.rs' at line 86
'''
cause = 'Failed to save authentication key file.: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }'
method = 'Panic'
backtrace = '''

   0: 0x5637bba6e2c8 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hcd1fa878e1b8802a
   1: 0x5637bbad800b - tokio::runtime::enter::Enter::block_on::h95d34c6dc245a0d5
   2: 0x5637bbaeda97 - tokio::runtime::context::enter::h186f41ed33a1603c
   3: 0x5637bbac58cf - tokio::runtime::handle::Handle::enter::hd6854b6249e24b90
   4: 0x5637bbab5b67 - tunnelto::main::h8cef60dfb4b7b7ab
   5: 0x5637bbafb743 - std::rt::lang_start::{{closure}}::ha5936fcca8ddcd9e
   6: 0x5637bbd627a8 - std::rt::lang_start_internal::{{closure}}::h6d21eebfa4beaf70
                at src/libstd/rt.rs:52
                 - std::panicking::try::do_call::h560a27b87db38b9c
                at src/libstd/panicking.rs:297
                 - std::panicking::try::h453d4afd696011f9
                at src/libstd/panicking.rs:274
                 - std::panic::catch_unwind::h211d02671f23030f
                at src/libstd/panic.rs:394
                 - std::rt::lang_start_internal::h464df2bbf46c7e7c
                at src/libstd/rt.rs:51
   7: 0x5637bbab5c72 - main
   8: 0x7fd61a7e0b97 - __libc_start_main
   9: 0x5637bba340ca - _start
  10:        0x0 - <unknown>'''

I'm having trouble working out the folder and file that are being written to.

Originally created by @bbros-dev on GitHub (Oct 14, 2020). Original GitHub issue: https://github.com/agrinman/tunnelto/issues/27 I have a subscription with 5 subdomains set, and use the provided key in the following command. Running the following as `sudo` succeeds. However, run as the ordinary user: ```bash tunnelto set-auth --key <redacted> ``` Produces this error report: ```bash name = 'tunnelto' operating_system = 'unix:Ubuntu' crate_version = '0.1.12' explanation = ''' Panic occurred in file 'tunnelto/src/config.rs' at line 86 ''' cause = 'Failed to save authentication key file.: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }' method = 'Panic' backtrace = ''' 0: 0x5637bba6e2c8 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hcd1fa878e1b8802a 1: 0x5637bbad800b - tokio::runtime::enter::Enter::block_on::h95d34c6dc245a0d5 2: 0x5637bbaeda97 - tokio::runtime::context::enter::h186f41ed33a1603c 3: 0x5637bbac58cf - tokio::runtime::handle::Handle::enter::hd6854b6249e24b90 4: 0x5637bbab5b67 - tunnelto::main::h8cef60dfb4b7b7ab 5: 0x5637bbafb743 - std::rt::lang_start::{{closure}}::ha5936fcca8ddcd9e 6: 0x5637bbd627a8 - std::rt::lang_start_internal::{{closure}}::h6d21eebfa4beaf70 at src/libstd/rt.rs:52 - std::panicking::try::do_call::h560a27b87db38b9c at src/libstd/panicking.rs:297 - std::panicking::try::h453d4afd696011f9 at src/libstd/panicking.rs:274 - std::panic::catch_unwind::h211d02671f23030f at src/libstd/panic.rs:394 - std::rt::lang_start_internal::h464df2bbf46c7e7c at src/libstd/rt.rs:51 7: 0x5637bbab5c72 - main 8: 0x7fd61a7e0b97 - __libc_start_main 9: 0x5637bba340ca - _start 10: 0x0 - <unknown>''' ``` I'm having trouble working out the folder and file that are being written to.
Author
Owner

@agrinman commented on GitHub (Oct 16, 2020):

It tries to create a .tunnelto/ in your home directory (i.e run ls ~/.tunnelto/)

<!-- gh-comment-id:709699148 --> @agrinman commented on GitHub (Oct 16, 2020): It tries to create a `.tunnelto/` in your home directory (i.e run `ls ~/.tunnelto/`)
Author
Owner

@agrinman commented on GitHub (Oct 16, 2020):

Thanks for the error report, it shouldn't panic -- it should error in friendly way :)

<!-- gh-comment-id:709699361 --> @agrinman commented on GitHub (Oct 16, 2020): Thanks for the error report, it shouldn't panic -- it should error in friendly way :)
Author
Owner

@bbros-dev commented on GitHub (Oct 17, 2020):

OK, could you consider prioritizing the XDG convention of using location ~/.config/tunnelto/. Then, if ~/.config/ does not exist and XDG_* are not set, fallback to ~/.tunnelto/ ?

<!-- gh-comment-id:711027185 --> @bbros-dev commented on GitHub (Oct 17, 2020): OK, could you consider prioritizing the XDG convention of using location `~/.config/tunnelto/`. Then, if `~/.config/` does not exist and `XDG_*` are not set, fallback to `~/.tunnelto/` ?
Author
Owner

@Siilwyn commented on GitHub (Jan 14, 2021):

Would be great indeed!

Can use dirs::config_dir or dirs::data_dir for that. Would you accept a PR for this @agrinman?

<!-- gh-comment-id:760424152 --> @Siilwyn commented on GitHub (Jan 14, 2021): Would be great indeed! Can use [`dirs::config_dir`](https://docs.rs/dirs/3.0.1/dirs/fn.config_dir.html) or `dirs::data_dir` for that. Would you accept a PR for this @agrinman?
Author
Owner

@agrinman commented on GitHub (Apr 18, 2021):

hi sorry, missed this! yes a PR for this would be great!

<!-- gh-comment-id:822013148 --> @agrinman commented on GitHub (Apr 18, 2021): hi sorry, missed this! yes a PR for this would be great!
Author
Owner

@Siilwyn commented on GitHub (Jun 9, 2021):

Ah it seems I can't use it without paying unless I spin up my own server, not sure if I will pick this up. So for anybody else, feel free to do so.

<!-- gh-comment-id:857533732 --> @Siilwyn commented on GitHub (Jun 9, 2021): Ah it seems I can't use it without paying unless I spin up my own server, not sure if I will pick this up. So for anybody else, feel free to do so.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tunnelto#26
No description provided.