[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Usage of dpkg under cygwin



> >>>I looked into it, and tar actually supports --owner <uid> and
> >>>--group <gid>. They're just not documented on the man page. And
> Files are not necessarily owned by root or under the group of root. 
> They may need to be under the www-data user, mysql user, or games 
> group, or utmp group, or other things of that sort. And most likely it 
> is specific to each file, not the whole archive as a whole. Unless you 
> can use --owner and --group to specify the permissions for each 
> individual file, it doesn't solve the problem either.

You can do that, but you have to use separate them with the -C option.

$ tar zcf asdf.tar.gz --owner root --group root usr/bin/alpha \
          --group tty usr/bin/bravo

means "archive alpha and bravo with root.tty", but

$ tar zcf asdf.tar.gz --owner root --group root usr/bin/alpha \
          -C . --group tty usr/bin/bravo

means "archive alpha as root.root, cd to '.' and then archive bravo as
(root).tty".

One single drawback: the archive may be slightly larger, since this will
create the list:
usr
usr/bin
usr/bin/alpha
usr
usr/bin
usr/bin/bravo

   /Clacke



Reply to: