Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: tar and permissions
- To: tlug@example.com
- Subject: Re: tar and permissions
- From: Bruno Raoult <braoult@example.com>
- Date: Wed, 24 Oct 2001 22:07:03 +0900
- Content-transfer-encoding: 7bit
- Content-type: text/plain; charset=us-ascii; format=flowed
- Delivered-to: tlug@example.com
- List-help: <mailto:tlug-request@example.comsubject=help>
- List-post: <mailto:tlug@example.com>
- List-subscribe: <mailto:tlug-request@example.comsubject=subscribe>
- List-unsubscribe: <mailto:tlug-request@example.comsubject=unsubscribe>
- Old-return-path: <braoult@example.com>
- References: <20011024201825.C69B.AKAMINE@example.com> <3BD6BBB4.7020908@example.com>
- Reply-to: tlug@example.com
- Resent-from: tlug@example.com
- Resent-message-id: <Coxt6.A.5vD.rxr17@example.com>
- Resent-sender: tlug-request@example.com
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012
Ooops... Of course, the last "tar" command of my example should not have the "-p" option... Copy-paste problem :-) Bruno Raoult wrote: > Hector Akamine wrote: > >> Hi, >> >> I am confused about the meaning of the "preserve permissions" (-p) >> switch in tar. According to what I have read, using -p keeps the file >> permissions as the original files. Then, what happens when I use tar >> without >> -p? >> >> I want to copy the contents of some user's directory using tar. I think >> I should make the operation as root. If I use -p, will it keep the >> file-directory permissions and owners as the original ones? What happens >> if I don't use -p? >> >> Thanks in advance > > Here is an example of the difference using or not -p. This is linked > to umask. > Not using -p could give files more restrictive permissions to file, > depending on umask value. > > pern br> mkdir tar > pern br> cd tar > pern br> touch foo > pern br> ls -l > total 0 > -rw-r--r-- 1 br users 0 Oct 24 21:52 foo > pern br> tar cvf foo.tar foo > foo > pern br> mv foo foo.orig > pern br> umask 777 > pern br> tar xpvf foo.tar > foo > pern br> mv foo foo-p > pern br> tar xpvf foo.tar > foo > 123 pern br> ls -l > total 12 > ---------- 1 br users 0 Oct 24 21:52 foo > -rw-r--r-- 1 br users 0 Oct 24 21:52 foo-p > -rw-r--r-- 1 br users 0 Oct 24 21:52 foo.orig > -rw-rw-rw- 1 br users 10240 Oct 24 21:53 foo.tar > > > > > ----------------------------------------------------------------------- > Next Technical Meeting: Sat, Nov 17 13:30- Leading Edge, Place Canada > Next Nomikai Meeting: Fri, Dec 21 19:30- Tengu Tokyo Eki-Mae > ----------------------------------------------------------------------- > more info: http://www.tlug.gr.jp Sponsor: Global Online Japan >
- References:
- tar and permissions
- From: Hector Akamine <akamine@example.com>
- Re: tar and permissions
- From: Bruno Raoult <braoult@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: tar and permissions
- Next by Date: Re: kinput and kterm SOLVED!!!!!
- Previous by thread: Re: tar and permissions
- Next by thread: cd using inodes?
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links