Bug 380681 - pungi requires root to run gather and createrepo stage
pungi requires root to run gather and createrepo stage
Product: Fedora
Classification: Fedora
Component: pungi (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-11-13 13:49 EST by Josh Cogliati
Modified: 2013-01-09 20:43 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-15 15:27:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Josh Cogliati 2007-11-13 13:49:02 EST
Description of problem:
If pungi is run as a non-root user, it prints out "You must run pungi as root" 
However, pungi can be run as non-root for the Gather stage and the Createrepo
stage (possibly others, but I haven't checked).  

In fedora 7, I used the gather and createrepo stages to create a repository that
I then burned onto a DVD and used for updating other computers.  This worked
fine as a user.  Now, to do this I have to modify  /usr/bin/pungi to eliminate
the check.  

Version-Release number of selected component (if applicable):

How reproducible:
$ pungi --help
You must run pungi as root
$ pungi -G
You must run pungi as root

Steps to Reproduce:
1. run pungi as non-root user.
2. Watch error message even for something that would have succeeded.
Actual results:
pungi doesn't run.

Expected results:
pungi should only output the message for the stages that cannot be run as a
regular user, or if all the stages are enabled.

Additional info:
A fix would be to move the check for root until after the command line arguments
are parsed, and only output the message if a stage that requires root is being
$ pungi -G
.... run pungi gather stage.
$ pungi -I
You must run the pungi CreateISO stage as root.

Alternatively, create a --force-no-root-check argument that causes the uid=0
check to be ignored.  
$ pungi -G
You must run pungi as root
$ pungi --help 
 --force-no-root-check  Disables root check.  May cause pungi to fail later.
$ pungi -G --force-no-root-check
Warning: running pungi as user.  May fail.
... rest of pungi running.
Comment 1 Jesse Keating 2007-11-15 15:27:55 EST
Filed https://hosted.fedoraproject.org/projects/pungi/ticket/56 , will track there.

Note You need to log in before you can comment on or make changes to this bug.