root+tar's '--same-owner --preserve' options

Kevin Day thekevinday at gmail.com
Mon Mar 10 15:10:24 PDT 2008


On Mon, Mar 10, 2008 at 1:53 AM, marty <marty at goodoldmarty.com> wrote:
> > The patch is on extract.c. It comments out the check done to see if geteuid is
>  > root, which automatically enables the options to preserve permissions when
>  > extracting files. Everything else works normally. How tarballs are created is
>  > unaffected.
>  >
>  It looks like you are saying you just broke Amanda, and a lot of other programs
>  and scripts that normally run as root, and expect permissions to be restored.
>  Wow, that would be fun to watch, but please count me out of that action.
>
>  Marty B.
>  --
>  A better mousetrap results in better mice. C. Darwin.

The first mistake would be that the scripts are run as root.
If they must be run as root, then you probably should be checking
their functionality anyway.
In which case, you can add the -p as your checking.
Otherwise letting some scripts run as root without even questioning
it...well I think people joined this mailing list to get away from
such bad practices and not turn a blind eye to them.


-- 
Kevin Day



More information about the hlfs-dev mailing list