I know it sounds crazy; however, I know that there are certain things that viruses can do that regular scripts and such can’t do (at least, with all my research anyway) like totally locking a file so that it’s REALLY hard to get rid of it.
I need to (on purpose) lock a certain file when it gets downloaded from the server. :-X How would I go about finding how a virus would accomplish this and then make it happen on that file alone (not every file in system, only on certain file…period)?
Does this make sense? ??? I hope I’m explaining what I need to do clearly. If you have any suggestions, please contact me here.
Right; however, I need to be able to do it on the fly from the server point of view.
I have images that have watermarking that NEEDS to stay with the image. When you download it from the server using the download link, the OPEN allows the viewing and modification (eliminating the watermarking) of the image. I need to block that.
If you have any idea how to accomplish this without going down the road of the abilities of certain viruses, please fill me in. The simple changing of the file attributes won’t work. I’ve tried that.
You’d certainly need a code running on that machine; if the file is simply downloaded (but not executable or not executed), there’s no way to do such thing, virus or not.
However, I’m not completely sure what do you mean by “watermarking”. Good image watermarking algorithms are basically impossible to remove, without destroying the image completely (i.e. without turning the file useless) - and it’s got absolutely nothing to do with restricting access to the file, but rather with embedding (invisible) information into the file; the user can freely modify the file, but the watermark will still be detectable.
You need to look more at copyright protection than trying to lock the file, you can’t do anything on your server to block what a user does on their system, e.g. you can’t lock a file in the way you are talking, hidden, read only, etc.
That is totally outside the servers control and if you were somehow able to manage to make changes to a users system you would most likely be guilty of computer misuse/hacking or some illegal act.
So if you are going to make your images available for download you need to protect them against copyright theft and the removal of any watermark/branding. So you would be looking at having the files on the server on something like a .jpg which doesn’t have layers so the watermark is harder to remove.
If someone edits a .jpg then saves it the quality is also going to suffer. So I believe the file format, quality, choice of software that does the watermark, how strong that watermarking is and its strategic placement are more important to you than what you are trying to do in this question.
I already know how to watermark an image; though all that I have seen become visible (even as a shadow) in the image. What I need would then be TOTALLY invisible and would not be able to be removed without killing the image entirely AND that could be text as the watermark and driven totally on the fly using php. Any suggestions???
My understanding is that you want an image on a website, and when someone goes to download it, you want your server to apply a watermark before downloading, correct?
You could use a “disable right-click” script on your website, and have a link to download the image, and link it to the watermarked version.
Of course, smart web users will just view the source of your page, find the actual link to the un-watermarked image, and directly download it, but I’m sure there aren’t many people that would know how.
Just my $.02
I’m sure there are other software packages that can dynamically place a watermark on an image before it’s downloaded, but I think you’ll find workarounds are easier and cheaper.
I am familiar with the use of right mouse click scripts. When you apply those types of things, people tend to work hard to get past it. The images are being stored in a folder above the root to help stop people from getting access to them in an raw state. What I am going to be doing (if I can) is to add date/time, IP, etc… info directly into the watermark so that it can be found no matter what they want to do to the image. Since it won’t be visible in the viewable image, there will be less chance of people wanting to mess with it or to try to get around things AND if they try, it will make the image unusable. Hopefully, that’ll deter wanna-be Picasso’s out there…
I’ll try to see if I can dig up some more info for you if I have the time. There seems to be a lot of stuff out there to weed through, but if you’re patient enough, I’m sure you can find something.
I’ve tried the chmod-thing with no success.
I’ve tried digging into the headers command, thus far, no luck setting as system or read-only file.
I know that viruses have the ability to change the file’s attributes; however, I’ve had no luck with that.
Chmod is only of use on the server relating to who has permission to do what to the file when it is on the server.
You have to protect the file with the watermark software before you load it on to your server. Or the download link points to the watermarked image in a different location to the lower resolution image file displayed on the site, no need to convert on the fly.
You can’t set the policy or file attributes as to how the file will be saved on the ‘users system’ it is that simple. Even if it were legally possible there is nothing to stop a savvy user from reversing that lock. What the user can’t reverse is the watermarking of the image if the software used to watermark it is strong.
What you’re really looking to do is to dynamically place a watermark on hosted images as they are downloaded. Be it a right-click, “save image as” or a “Ctrl-click” for Mac users, or by using a download link on your page.
You want to show the un-altered image on your website, and have a watermarked image on download.
There’s no way to alter a file once it’s downloaded, because obviously it’s not on your machine anymore as DavidR explained.
Simply put, once it’s off of your server, you have no control. It’d be just like taking someone’s hard drive out of their computer (downloading the image) and putting the drive in your computer (the file downloaded and is now on your drive). You can basically do whatever you want with the files now, provided they’re not encrypted (and the encryption part is what I explained earlier with my digital-watermarking link).
If they’re digitally watermarked, it’ll be totally transparent, but recognizable, even if the file changes in some way.
So you basically have a few options:
1: Watermark the image and put it on your website. It’ll show the watermark, so everyone will see it, both on your website and when it’s downloaded.
2: Find software to dynamically place a watermark on download (This is the harder part to do, you need to find and configure some software to do it), but basically the image on your website will be unaltered, but any type of download will automatically put a watermark on the image, so no one can steal / claim it is theirs.
3: Use a digital watermark. No one will be able to tell that it’s yours just by looking at it on screen, but the digital signature will be present at all times, so if someone uses the image elsewhere, you’ll be able to tell that they stole it from you.
There’s another option, Steganography (which I’m currently using along with digital watermarking.) I only need to lock the file (mark it as system, read-only and the attributes can not change) before the download. That way once it’s downloaded, it’ll stay exactly as it was the second that it was downloaded. I have the ability to view the hidden data from the image so that I can make sure it’s mine; however, that part changes when it could be edited.