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

Permission Denied - Ubuntu 22.04.3 latest #27

Open
JayCroghan opened this issue Oct 17, 2023 · 7 comments
Open

Permission Denied - Ubuntu 22.04.3 latest #27

JayCroghan opened this issue Oct 17, 2023 · 7 comments

Comments

@JayCroghan
Copy link

thread 'main' panicked at 'Can't open test file: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', src/utils.rs:94:45
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@sassman
Copy link
Owner

sassman commented Oct 17, 2023

Thanks for reporting.

How do you execute the program? Via snap or anything?
What is your current working directory?
What permissions does your current working directory have?

@JayCroghan
Copy link
Author

Installed via snap, executed at bash with ssd-benchmark command.
Tried in ~ and \media\ssd which is a full read/write NTFS file system.
Full read/write.

@sassman
Copy link
Owner

sassman commented Oct 21, 2023

Can you pls try it on a native FS? Like on linux an ext4 or something?

@JayCroghan
Copy link
Author

My home drive is ext4, when i run it in /~ it also gives the same error.

@RushJet1
Copy link

For me it works on my main ext4 SSD, but when I try on the NTFS one it has the same error as JayCroghan reported.

@sassman
Copy link
Owner

sassman commented Nov 13, 2023

I suspect the problem on the mounted fs.
What does mount say? What are your users permissions?

Also snaps create a own layer of permissions on top of your current user.

@ekuznetsov139
Copy link

Snap architecture severely restricts the ability of its snaps to access the file system. Pretty much the only places where it is allowed to write are /tmp and its own user storage area. It can't even see the inside of your $HOME. As such, ssd-benchmark has very limited usefulness if installed as a snap.
At best, you can install it as a snap, but then run the internal executable directly. On my system, the command is:
/snap/ssd-benchmark/118/bin/ssd-benchmark
This bypasses snap's confinement and gives the process the same privileges as the shell where it is executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants