Re: Set file permission without using chmod or umask??
- From: Florian Diesch <diesch@xxxxxxxxxxxxx>
- Date: Sat, 12 Apr 2008 11:03:00 +0200
fazlin <fazlincse@xxxxxxxxx> wrote:
I have a script that does the following:
$ cat myscript
find . -name *.c > /tmp/list
$
My default umask value is 022. So the file is created with 644
permission (assume /tmp/list did not exist before).
I need "/tmp/list" file to have 640 permission. As for as i know,
there are two ways of doing it in linux - using umask before my 'find'
statement (or) using chmod after 'find' statement.
Is there any other way to set my required file permission other than
this?
You can first create an empty file with the right permissions, e.g. using
install -m 640 /dev/null tmp/list
Florian
--
<http://www.florian-diesch.de/>
-----------------------------------------------------------------------
** Hi! I'm a signature virus! Copy me into your signature, please! **
-----------------------------------------------------------------------
.
- References:
- Set file permission without using chmod or umask??
- From: fazlin
- Set file permission without using chmod or umask??
- Prev by Date: Where do I report abusers and, or SPAM mailers?
- Next by Date: Sale Price Girard Perregaux Worldwide Time Control Watches Replica - Girard Perregaux Watches Minimum Price Wholesale
- Previous by thread: Re: Set file permission without using chmod or umask??
- Next by thread: Re: Set file permission without using chmod or umask??
- Index(es):
Relevant Pages
|