🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Joseph Tam Tue, 17 Nov 1992 01:46
Gnutar 1.11.1 bug - ownership of directories when extracted as root
#1108
Author: Joseph Tam
Date: Tue, 17 Nov 1992 01:46
76 lines
3186 bytes
You have probably got many reports of this bug, but I'll report it just
in case nobody else has.  Gnutar 1.11.1 doesn't set the ownership correctly
for explicitly created directories when the user is root.  The following
results are from a Sun SparcStation and an SGI Indigo.

Here is the contents of a test archive.

	gnutar tvZf test.tar.Z

	drwxr-xr-x 210/19            0 Nov 17 09:29 1992 test/
	-rw-r--r-- 210/19            0 Nov 17 09:29 1992 test/f1
	drwxr-xr-x 210/19            0 Nov 17 09:29 1992 test/d1/
	drwxr-xr-x 210/19            0 Nov 17 09:29 1992 test/d1/d2/
	-rw-r--r-- 210/19            0 Nov 17 09:29 1992 test/d1/d2/f5
	-rw-r--r-- 210/19            0 Nov 17 09:29 1992 test/d1/d2/f6
	-rw-r--r-- 210/19            0 Nov 17 09:29 1992 test/d1/f4
	-rw-r--r-- 210/19            0 Nov 17 09:29 1992 test/d1/f3
	-rw-r--r-- 210/19            0 Nov 17 09:29 1992 test/f2

user #210 = tam
group #19 = atmos

When extracting the archive as root, I get

	gnutar xZf test.tar.Z
	ls -lR test

	total 1
	drwxr-xr-x   3 root     wheel        512 Nov 17 09:29 d1
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:29 f1
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:29 f2

	test/d1:
	total 1
	drwxr-xr-x   2 root     wheel        512 Nov 17 09:29 d2
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:29 f3
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:29 f4

	test/d1/d2:
	total 0
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:29 f5
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:29 f6


As you can see, the directories have ownership root/wheel.  However, if
you add the f_modified flag, you get the correct ownership at the cost
of changing the original modification time:

	gnutar xmZf test.tar.Z
	ls -lR test

	total 1
	drwxr-xr-x   3 tam      atmos        512 Nov 17 09:40 d1
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:40 f1
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:40 f2

	test/d1:
	total 1
	drwxr-xr-x   2 tam      atmos        512 Nov 17 09:40 d2
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:40 f3
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:40 f4

	test/d1/d2:
	total 0
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:40 f5
	-rw-r--r--   1 tam      atmos          0 Nov 17 09:40 f6


Joseph Tam <tam@ocgy.ubc.ca>   \___ \___________
Department of Oceanography     \___ \___________
University of British Columbia \___ \___________
Vancouver, BC, Canada          \___     \___
V6T 1W5                \___    \___     \___
                       \___    \___     \___
Phone: (604) 822-3911   \_________  \__ \___ \__
Fax:   (604) 822-6091    \______    \__ \___ \__
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads