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

Re: Deleting owned files...



Andreas Schwab wrote:
> 
> Michael Smith <miff@apanix.apana.org.au> writes:

> |> I suspect this is also the reason why tar 1.11.2 (I rebuilt this with the
> |> pl44 mintlibs if anyone is interested) can't set ownership/permissions
> |> on files it extracts sometimes (that's annoying!).
> 
> No, this has nothing to do with it.  Only the superuser can change the
> ownership of a file, and you can only change the mode if you own the
> file (or you are effectively root).  I never had problems extracting a
> tarfile if tar is running as root.  Unter SysV, everyone can give away
> files, but that is too risky, and GNU tar will never do that as a
> non-privileged process.

I've seen this, too:

lancelot# uname -a
MiNT lancelot 1.10 4.4 atari
[Note: Running MiNT 1.10 with nox' and Kay's patches, MinixFS 0.60 PL9]
lancelot# whoami
root
lancelot# id
uid=0(root) gid=0(wheel)
lancelot# tar --version
GNU tar version 1.11.2
lancelot# tar tzvf uucp-1.03.tar.gz
drwxrwxr-x 269/15            0 Apr  7 05:31 1992 uucp-1.03/
-r--r--r-- 269/15        17976 Apr  7 05:05 1992 uucp-1.03/COPYING
[...]
[Note: The file COPYING is read-only]
lancelot# tar xzvf uucp-1.03.tar.gz uucp-1.03/COPYING
uucp-1.03/COPYING
tar: Could not create file uucp-1.03/COPYING : path not found.
lancelot# mkdir uucp-1.03
lancelot# tar xzvf uucp-1.03.tar.gz uucp-1.03/COPYING
uucp-1.03/COPYING
tar: couldn't change access and modification times of uucp-1.03/COPYING:
	access denied.
lancelot# ll !$
-r--r--r--   1 269      15          17976 May 11 19:46 uucp-1.03/COPYING
lancelot# tar xzvf uucp-1.03.tar.gz uucp-1.03/COPYING
uucp-1.03/COPYING
tar: Could not create file uucp-1.03/COPYING : access denied.
lancelot# ll !$
-r--r--r--   1 269      15          17976 May 11 19:46 uucp-1.03/COPYING

nasim% uname -a
SunOS nasim 4.1.1 3 sun3
[Note: SunOS 4.1.1 is a BSD-4.3 type UNIX OS]
nasim% whoami
knarf
nasim% tar --version
GNU tar version 1.11.2
nasim% # No mkdir needed
nasim% tar xzvf /pub/atari/Uucp/uucp-1.03.tar.gz uucp-1.03/COPYING
uucp-1.03/COPYING
nasim% ll uucp-1.03/COPYING
-r--r--r--  1 knarf    admin       17976 Apr  7  1992 uucp-1.03/COPYING

No further comment needed...

-- 
    Frank Bartels       |      Fax/UUCP: + 49 89 5469593          | MiNT is
knarf@nasim.sta.sub.org | Login: nuucp Index: /pub/ls-lR.nasim.gz | Now TOS!