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

Remove requirement to run as root on Linux #505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgni
Copy link

@bgni bgni commented Apr 8, 2020

Basic functionality of running as non-privileged user is working but I've not written a lot of Python and I don't know a lot about making a bootable usb so I expect that there are issues with this PR.

@bgni bgni changed the title Remove reuirement to run as root on Linux Remove requirement to run as root on Linux Apr 8, 2020
@ckotte
Copy link

ckotte commented Jul 20, 2020

I get Error: Error opening /dev/sdb: Permission denied:

No USB disk found...
Using pyudev for detecting USB drives...
	/dev/sdb
	/dev/sdb1
Traceback (most recent call last):
  File "/home/fubar/temp/multibootusb/scripts/mbusb_gui.py", line 167, in onComboChange
    usb.gpt_device(config.usb_disk)
  File "/home/fubar/temp/multibootusb/scripts/usb.py", line 387, in gpt_device
    is_gpt = osdriver.gpt_device(dev_name)
  File "/home/fubar/temp/multibootusb/scripts/osdriver.py", line 412, in gpt_device
    raise RuntimeError(str(_err_out, encoding))
RuntimeError: Error: Error opening /dev/sdb: Permission denied

It fails running parted /dev/sdb -s print. Are you able to use parted with a non-root user? I thought root permissions are required for this!?

PS: If the USB stick isn't already mounted with udisk (through GNOME), it cannot even find the device:

No USB device found...
Using pyudev for detecting USB drives...

But this happens also when running under root.

@xyproto
Copy link

xyproto commented Sep 22, 2020

I like how multibootusb currently can make modifications to the USB drive whenever the user clicks "Install distro" and installs another distro. This requires either root/sudo access or more fine grained access for the current user. This is not a problem with multibootusb.

However, multibootusb could also, in theory, provide value just by letting users assemble an image and then launch it in QEMU using the "Boot ISO/USB" button, without needing to access a device.

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

Successfully merging this pull request may close these issues.

4 participants