ssd-benchmark-rs icon indicating copy to clipboard operation
ssd-benchmark-rs copied to clipboard

Permission Denied - Ubuntu 22.04.3 latest

Open JayCroghan opened this issue 2 years ago • 9 comments

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

JayCroghan avatar Oct 17 '23 14:10 JayCroghan

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?

sassman avatar Oct 17 '23 20:10 sassman

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.

JayCroghan avatar Oct 18 '23 07:10 JayCroghan

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

sassman avatar Oct 21 '23 20:10 sassman

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

JayCroghan avatar Oct 23 '23 14:10 JayCroghan

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.

RushJet1 avatar Nov 13 '23 01:11 RushJet1

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.

sassman avatar Nov 13 '23 07:11 sassman

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.

ekuznetsov139 avatar Mar 24 '24 23:03 ekuznetsov139