From: Phillip Gawlowski Date: 2008-05-13T13:26:19+09:00 Subject: Re: about writing file??? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Pat Kiatchaipipat wrote: | hi, I have problem about writing file. | I use this | | data = File.new("/options.sav","w") | | and I get file name option.sav in my path but when I open it with | notepad. It can modify :'( I don't want this because options.sav has | save data from my app that can't hack it! how can I write file with | can't be modified??? You can't. All it needs is the correct privileges to access the file. If you want the data to be somewhat tamper-proof, use encryption. Note, though, that all it needs is the key to tamper with the file again. Or you could obfuscate the file (ROT13, BASE64 encoding, what have you). It'll be a loosing battle, though. If you find a solution to this, the RIAA and MPAA, as well as SecuROM would like to have a word with you, since you made DRM possible. ;) - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan Blog: http://justarubyist.blogspot.com ~ "Some things don't need the thought people give them." -Hobbes -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgpGHgACgkQbtAgaoJTgL8lUgCeKxh9TO2SdeOu+Wnlj1yCgN7g kmEAnizWOaVe6fw6oqLsKe3XgVvUx8xF =2h6b -----END PGP SIGNATURE-----