By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

Modifying read only files with java

P: n/a
Hi

Can anyone provide an example of how to modify read-only files in java?

Thanks
M
Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Manavendra Gupta" <ma*********@cramer.com> wrote in message news:<40***********************@reading.news.pipex .net>...
Hi

Can anyone provide an example of how to modify read-only files in java?

Thanks
M

Change it to be writable. You can use OS command from Java if you have
the user privilege to do it.
Jul 17 '05 #2

P: n/a
Manavendra Gupta wrote:
Can anyone provide an example of how to modify read-only files in java?


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.
Jul 17 '05 #3

P: n/a
nos
can you tell me what "read only" means

"Stewart Gordon" <sm*******@yahoo.com> wrote in message
news:c2**********@sun-cc204.lut.ac.uk...
Manavendra Gupta wrote:
Can anyone provide an example of how to modify read-only files in java?


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.

Jul 17 '05 #4

P: n/a
nos wrote:
can you tell me what "read only" means

<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.
Jul 17 '05 #5

P: n/a
nos

"Stewart Gordon" <sm*******@yahoo.com> wrote in message
news:c2**********@sun-cc204.lut.ac.uk...
nos wrote:
can you tell me what "read only" means

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

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
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.