[Top][All Lists]

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

[Help-tar] Read-only files in read-only directories

From: Jean Delvare
Subject: [Help-tar] Read-only files in read-only directories
Date: Tue, 23 Nov 2004 16:52:53 +0100 (CET)

Hi all,

I am facing a problem I don't seem to be able to solve using GNU tar. I
am using 1.14. Tried 1.14.90 with no more luck.

I have a whole tree of files and directories which I need to update on a
regular basis. Some files in the tree are read-only, some directories
are as well, and more specifically some read-only files live in
read-only directories. The updates come in the form of (surprise) a tar

The problem I have is with these read-only files in read-only
directories; tar will fail updating them. It also fails creating new
files in read-only directories for the same reason.

When creating the tree in the first place, tar will automatically,
(temporarily since 1.14) chmod u+wx the directories so that it can
create the files they are supposed to contain. But it won't do the same
when overwriting an existing read-only directory. This sounds somewhat
inconsistent to me.

Before you ask, I cannot use --recursive-unlink (nor rm -rf $root for
that matter) because the update archives only contain the files that
changed since the last update; they are not complete. Also,
--unlink-first will of course work for read-only files but fails for
read-only directories.

So my question is, did I overlook the manual page? Does an option exist
that will make tar behave the way I need?

If not, wouldn't it be considered a good thing to add such an option or
even change the default behavior?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]