Re: create file that is readable only [message #73160] |
Thu, 28 October 2010 14:16  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paolo writes:
> Inscribe the bits on stone - may not be properly immutable but
> should withstand casual hacking....
Coyote is getting *extremely* nervous with all this talk
about unerasable files. Seems he has quite a bit of, uh,
personal material on his hard drive. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: create file that is readable only [message #73161 is a reply to message #73160] |
Thu, 28 October 2010 14:01   |
pgrigis
Messages: 436 Registered: September 2007
|
Senior Member |
|
|
On Oct 28, 4:53 pm, Truong Le <truong...@gmail.com> wrote:
> On Oct 28, 4:24 pm, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> Truong Le writes:
>>> I need to know how I can create a new file from idl and that this new
>>> file is readable only!
>
>> You can use the FILE_CHMOD procedure to set file attributes
>> however you like.
>
>> Cheers,
>
>> David
>
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming:http://www.dfanning.com/
>> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
> but the FILE_CHMOD still allow me to modify the file if I agree to
> modify it.
>
> This is how I set it
>
> FILE_CHMOD, filename, U_WRITE=0, G_WRITE=0,O_WRITE=0
>
> Is there anyway we can set full restriction such that NO ONE is allow
> to modify it?
>
> Thanks!
Inscribe the bits on stone - may not be properly immutable but
should withstand casual hacking....
Ciao,
Paolo
|
|
|
Re: create file that is readable only [message #73162 is a reply to message #73161] |
Thu, 28 October 2010 13:53   |
Truong Le
Messages: 42 Registered: September 2010
|
Member |
|
|
On Oct 28, 4:24 pm, David Fanning <n...@dfanning.com> wrote:
> Truong Le writes:
>> I need to know how I can create a new file from idl and that this new
>> file is readable only!
>
> You can use the FILE_CHMOD procedure to set file attributes
> however you like.
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
but the FILE_CHMOD still allow me to modify the file if I agree to
modify it.
This is how I set it
FILE_CHMOD, filename, U_WRITE=0, G_WRITE=0,O_WRITE=0
Is there anyway we can set full restriction such that NO ONE is allow
to modify it?
Thanks!
|
|
|
|
|
Re: create file that is readable only [message #73241 is a reply to message #73162] |
Fri, 29 October 2010 01:23  |
Carsten Lechte
Messages: 124 Registered: August 2006
|
Senior Member |
|
|
On 28/10/10 22:53, Truong Le wrote:
> Is there anyway we can set full restriction such that NO ONE is allow
> to modify it?
If you want to prevent anyone from restoring write permissions on the
file and then modifying it, you have to change the owner of the file
and then give only read permission to other users. As far as I know,
this owner change can only be done by the super user/system
administrator. It is how all the system files are protected against
modification by regular users. If you also want to prevent deletion of
the file, its containing directory must also be owned by a different user.
chl
|
|
|
|