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

bw cli - create attachment generates error #4556

Closed
1 task done
terribletrouble opened this issue Jan 24, 2023 · 4 comments
Closed
1 task done

bw cli - create attachment generates error #4556

terribletrouble opened this issue Jan 24, 2023 · 4 comments
Labels
bug cli CLI Application

Comments

@terribletrouble
Copy link

Steps To Reproduce

Grab an existing item, set your session, execute the following:

bw create attachment --file ./hist.txt --itemid REDACTED --session ‘REDACTED’

Expected Result

Expect the attachment to be added.

Actual Result

This is the actual error generated:

node:fs:585
handleErrorFromBinding(ctx);
^

Error: EACCES: permission denied, open ‘/home/jason/hist.txt’
at Object.openSync (node:fs:585:3)
at Object.openSync (pkg/prelude/bootstrap.js:796:32)
at Object.readFileSync (node:fs:453:35)
at Object.readFileSync (pkg/prelude/bootstrap.js:1082:36)
at CreateCommand. (/snapshot/clients/apps/cli/build/bw.js:31997:55)
at Generator.next ()
at /snapshot/clients/apps/cli/build/bw.js:31900:71
at new Promise ()
at /snapshot/clients/apps/cli/build/bw.js:31896:12
at CreateCommand.createAttachment (/snapshot/clients/apps/cli/build/bw.js:31979:16) {
errno: -13,
syscall: ‘open’,
code: ‘EACCES’,
path: ‘/home/jason/hist.txt’
}

Screenshots or Videos

Not needed.
Permissions on the test file are as follows:

ls -asl hist.txt
8 -rw-rw-r-- 1 jason jason 7466 Jan 21 23:15 hist.txt

Additional Context

Not sure where the permission denied error comes from, clearly I can access my own file, and running su/sudo looses the session, so that is N/A.

Operating System

Linux

Operating System Version

Linux ubuntu 5.15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Shell

Bash

Build Version

2023.1.0

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@terribletrouble terribletrouble added bug cli CLI Application labels Jan 24, 2023
@Greenderella
Copy link
Member

Hi there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@BlueTurtle121
Copy link

BlueTurtle121 commented May 29, 2023

Hi,

I am having this issue. The CLI, file, folder, and user all have the appropriate permissions. I can create items fine, just not attachments. The attachment was a PDF.

root@[user]:/home/vboxuser/Dev# bw create attachment --file "./file.pdf" --itemid [itemID]

node:fs:585

  handleErrorFromBinding(ctx);

  ^



Error: EACCES: permission denied, open '/home/vboxuser/Dev/file.pdf'

    at Object.openSync (node:fs:585:3)

    at Object.openSync (pkg/prelude/bootstrap.js:796:32)

    at Object.readFileSync (node:fs:453:35)

    at Object.readFileSync (pkg/prelude/bootstrap.js:1082:36)

    at CreateCommand.<anonymous> (/snapshot/clients/apps/cli/build/bw.js:35103:55)

    at Generator.next (<anonymous>)

    at /snapshot/clients/apps/cli/build/bw.js:35006:71

    at new Promise (<anonymous>)

    at /snapshot/clients/apps/cli/build/bw.js:35002:12

    at CreateCommand.createAttachment (/snapshot/clients/apps/cli/build/bw.js:35085:16) {

  errno: -13,

  syscall: 'open',

  code: 'EACCES',

  path: '/home/vboxuser/Dev/file.pdf'

}

@djsmith85
Copy link
Contributor

Duplicate of #3923

@djsmith85 djsmith85 marked this as a duplicate of #3923 Dec 22, 2023
@djsmith85
Copy link
Contributor

Hi @terribletrouble,

Thank you for your report. This report seems like it is a duplicate of #3923

If you wish to add any further information/screenshots/recordings etc., please feel free to do so at any time in there - our engineering team will be happy to review these.

This report will now be closed.

Thank you again

@djsmith85 djsmith85 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli CLI Application
Projects
None yet
Development

No branches or pull requests

4 participants