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

Robert Connolly robert at
Tue Mar 11 03:58:42 PDT 2008

On Tuesday March 11 2008 05:48:52 am marty wrote:
> > 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.
> Actually, the first mistake would be typing with your brain turned off.
> 'WHO' other than root can restore a backup or do anything else to a root
> filesystem? I would not need to question the cron scripts I use to do
> backups, nor the functionality of Amanda or other backup programs used in
> good practice. Tar is old and a has dozens of dependent programs that will
> not work with this "new and improved" version. That patch is well meaning,
> but misconceived IMO.
> Marty B.

According to my quick checking, Busybox and bsd Tar do not preserve 
permissions or ownership by default for root. Solaris and GNU Tar do. 
Packages shouldn't depend on either behavior, and should use options 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <>

More information about the hlfs-dev mailing list