Results 1 to 10 of 21
Hi folks,
How to lock a file of following format
1) .txt or .doc
2) .html or .htm
so that it can be read only. Copying its content with copy/paste ...
- 03-09-2005 #1Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
How to lock a file
Hi folks,
How to lock a file of following format
1) .txt or .doc
2) .html or .htm
so that it can be read only. Copying its content with copy/paste command is not allowed, nor duplicating it. Kinldy advise.
TIA
B.R.
satimis
- 03-09-2005 #2
This should work:
This sets the 'read' bit to one and all other bits to zero, since you don't seem to be dealing with executables.Code:chmod 444 file
- 03-09-2005 #3Just Joined!
- Join Date
- Feb 2003
- Posts
- 37
It's impossible to prevent duplication of a file if it can be read.
- 03-09-2005 #4
Just giving him the closest thing I could come up with
- 03-09-2005 #5Just Joined!
- Join Date
- Feb 2003
- Posts
- 37
Actually, I was commented on the original post, but now that I think about it.
chmod 400 file
Use that to prevent anyone, except the file owner from reading(or duplicating) the file.
- 03-09-2005 #6
The basic problem is that the term "read-only" has a particlar meaning in computer jargon, and it does NOT mean what satimis hopes it means.
In computer jargon, "read-only" means that the file/device can't be written to (as opposed to "read-write" or "write-only). This doesn't imply any restrictions on what the person or program reading from the file/device does with the data.
Anywaaaaays, what are we doing here instead of on JustLinux, anyway?
Isaac Kuo, ICQ 29055726 or Yahoo mechdan
- 03-09-2005 #7Linux Enthusiast
- Join Date
- Dec 2004
- Location
- Rockin' in the USA!!!
- Posts
- 603
^^I think we all know that, but rather, we're trying to provide a solution for him. Although I don't think it's possible to do what you're asking, you can change group permissions, that might give you something close to what you're looking for.
- 03-09-2005 #8Linux Guru
- Join Date
- Sep 2004
- Posts
- 1,546
Hi folks,
Tks for your advice and postings.
I came across such files on web. I was not allowed to high-light their contents and paste the same to another file. I'm interested to learn how to do it.
However I can print such a file as a .pdf file. So if we can stop this last job then the file shall become read only. To touch it is impossible.
satimis
- 03-09-2005 #9
you can acheive those locked html files on the web via javascript, but that won't apply to accessing them locally.
- 03-10-2005 #10Just Joined!
- Join Date
- Feb 2003
- Posts
- 37
Here's my return message. :)
Originally Posted by IsaacKuo
http://www.linuxforums.org/forum/post-181397.html
Generally, this is false. You can copy the content, you just have to copy from the page source instead. (Or save the page to disk, edit out the javascript, then re-open it locally.)
Originally Posted by lakerdonald
As for copying text from a pdf file: That's similar to trying to copy text from a graphic file. If you want to stop people from copying your text, only post screenshots of the text, instead of the actual text. (But that still won't stop people from duplicating the file.)


