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

SFTP Permission denied do not say what path failed, and sometimes error silently #1323

Closed
darkskiez opened this Issue Oct 4, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@darkskiez

darkskiez commented Oct 4, 2017

Output of restic version

restic version
restic 0.7.2 (v0.7.2-0-g5b1e4df1)
compiled with go1.8.3 on linux/amd64

How did you run restic exactly?

restic backup -x /

What backend/server/service did you use?

sftp

Expected behavior

SSH Permission denied "/path/to/repo/file"

Actual behavior

SSH Permission denied [unknown file]

Steps to reproduce the behavior

I had mounted a disk with my repo on it remotely but with the wrong user ids..

I chowned a bunch of files to the right id when I found out my mistake, but some
got missed after it had been cancelled

Do you have any idea what may have caused this?

I was a bit silly.

Do you have an idea how to solve the issue?

Add the path to the file that caused the error message.

If the key files are unreadable it silently fails with no error at all (this was a little scary)

armhold added a commit to armhold/restic that referenced this issue Oct 28, 2017

sftp ReadDir: add path to return error messages (resticgh-1323)
fix missing "Close" string in debug log fmt
@fd0

This comment has been minimized.

Show comment
Hide comment
@fd0

fd0 Oct 29, 2017

Member

Good point, thanks for raising this issue! It somehow fell off and I haven't read it, but @armhold fixed it in #1398. :)

Member

fd0 commented Oct 29, 2017

Good point, thanks for raising this issue! It somehow fell off and I haven't read it, but @armhold fixed it in #1398. :)

@fd0 fd0 closed this in #1398 Oct 29, 2017

fd0 added a commit that referenced this issue Oct 29, 2017

Merge pull request #1398 from armhold/sftp-readdir
sftp ReadDir: add path to return error messages (gh-1323)
@armhold

This comment has been minimized.

Show comment
Hide comment
@armhold

armhold Oct 29, 2017

Contributor

I should add that I was not able to repro the "if key files are unreadable it silently fails" bit... I always got an error msg from the sftp client code; it just did not include the path.

If you can give more detail on how to reproduce that problem I can revisit.

Contributor

armhold commented Oct 29, 2017

I should add that I was not able to repro the "if key files are unreadable it silently fails" bit... I always got an error msg from the sftp client code; it just did not include the path.

If you can give more detail on how to reproduce that problem I can revisit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment