"Manavendra Gupta" <manav.gupta@cr amer.com> wrote in message news:<40449b3d$ 0$19242$ed9e594 4@reading.news. pipex.net>...[color=blue]
> Hi
>
> Can anyone provide an example of how to modify read-only files in java?
>
> Thanks
> M[/color]
Change it to be writable. You can use OS command from Java if you have
the user privilege to do it.
Manavendra Gupta wrote:
[color=blue]
> Can anyone provide an example of how to modify read-only files in java?[/color]
Why do you want to do this? So you can write a trojan?
Stewart.
--
My e-mail is valid but not my primary mailbox, aside from its being the
unfortunate victim of intensive mail-bombing at the moment. Please keep
replies on the 'group where everyone may benefit.
"Stewart Gordon" <smjg_1998@yaho o.com> wrote in message
news:c2ae4t$2sf $1@sun-cc204.lut.ac.uk ...[color=blue]
> Manavendra Gupta wrote:
>[color=green]
> > Can anyone provide an example of how to modify read-only files in java?[/color]
>
> Why do you want to do this? So you can write a trojan?
>
> Stewart.
>
> --
> My e-mail is valid but not my primary mailbox, aside from its being the
> unfortunate victim of intensive mail-bombing at the moment. Please keep
> replies on the 'group where everyone may benefit.[/color]
nos wrote:[color=blue]
> can you tell me what "read only" means[/color]
<snip top of upside-down reply>
Short answer:
Yes.
Long answer:
Unable to be modified.
In file systems, it tends to mean having an attribute indicating that it
cannot be modified, e.g. in order to prevent accidental changes.
However, in some cases the user can switch off this attribute.
Stewart.
--
My e-mail is valid but not my primary mailbox, aside from its being the
unfortunate victim of intensive mail-bombing at the moment. Please keep
replies on the 'group where everyone may benefit.
"Stewart Gordon" <smjg_1998@yaho o.com> wrote in message
news:c2hr10$ob8 $1@sun-cc204.lut.ac.uk ...[color=blue]
> nos wrote:[color=green]
> > can you tell me what "read only" means[/color]
> <snip top of upside-down reply>
>
> Short answer:
> Yes.
>
> Long answer:
> Unable to be modified.
>
> In file systems, it tends to mean having an attribute indicating that it
> cannot be modified, e.g. in order to prevent accidental changes.
> However, in some cases the user can switch off this attribute.
>
> Stewart.
>[/color]
In UNIX/LINUX there is no such attribute for files or directories.
Only "read", "write", and "execute". As others have pointed out
in c.l.j.p if the directory that contains the so called "read only"
file is writable, the file can be deleted.
e.g.
drwxrwsrwx 1 Philip None 0 Mar 8 14:06 Cookies
d means directory
r means can be read
w means can be written
x means can execute
first rwx is for owner
second rwx is for members of the group
third rwx is for others
Comment