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

inform user when not running as root #6

Open
landroni opened this issue Feb 23, 2016 · 3 comments
Open

inform user when not running as root #6

landroni opened this issue Feb 23, 2016 · 3 comments

Comments

@landroni
Copy link

I tried to run flashbench 62 (for Ubuntu repos) as user, only for it to fail with a cryptic error message:

geek@liv-inspiron:~$ flashbench -a /dev/sdb 
sched_setscheduler: Operation not permitted
/dev/sdb: Operation not permitted

Then I attempted as root, and it worked OK.

It would be nice if flashbench inform user that it only works as root.

@tomato42
Copy link

you don't have to be root, you need to have permission to write to block devices

@landroni
Copy link
Author

Every time I try to run as simple user (i.e. non-root), I get the error above. I have no trouble writing to block devices using e.g. dd.

@bradfa
Copy link
Owner

bradfa commented Aug 19, 2016

In order to change the scheduler used, as flashbench does, you need to have CAP_SYS_NICE capability, so basically, you have to be root. Informing the user that the sched_setscheduler() call fails due to not being root or not having the proper capabilities is a reasonable feature.

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

3 participants