comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: create file that is readable only
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: create file that is readable only [message #73160] Thu, 28 October 2010 14:16 Go to next message
David Fanning is currently offline  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 Go to previous messageGo to next message
pgrigis is currently offline  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 Go to previous messageGo to next message
Truong Le is currently offline  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 #73163 is a reply to message #73162] Thu, 28 October 2010 13:24 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
Re: create file that is readable only [message #73240 is a reply to message #73162] Fri, 29 October 2010 05:01 Go to previous message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Thu, 28 Oct 2010, Truong Le wrote:

> Is there anyway we can set full restriction such that NO ONE is allow
> to modify it?

root can make files immutable (on Linux): chattr +i file

regards,
lajos
Re: create file that is readable only [message #73241 is a reply to message #73162] Fri, 29 October 2010 01:23 Go to previous message
Carsten Lechte is currently offline  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
Re: create file that is readable only [message #73258 is a reply to message #73162] Thu, 28 October 2010 14:26 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<1347e64f-ed53-44e1-90fc-1b82cd543a10@l17g2000yqe.googlegroups.com>,
Truong Le <truongvle@gmail.com> wrote:

> 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!

The Unix shell normally prompts the user before deleting a file
that has write permission turned off, but other applications do
not necessarily do so.

On a Unix system, to make certain that you cannot delete a file that
you own, you need to turn off write permission for the
directory that contains the file in question.

Ken Bowman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 8.0.1 Bugs Fixed
Next Topic: Orbit Calculation

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:32:21 PDT 2025

Total time taken to generate the page: 0.00868 seconds