H E L P !!!
having strange prob here. have to finish until 17pm today a plugin for an existing software. my plugin say excel to open a specific file and modify at specific filelocations any values. also its complete automatisated (remoted). All works fine but there is following big problem that i dont manage to solve atm.
The xls file should be protected against deleting by any user. only admin should have this right. I added a new testuser without any deleting permissions but the user can always delete the file on the system. why? Something special i have to notice or any idea where and how to fix the prob (system config, user accounts)!?
i know it would be possible to check in my plugin for username but foget this, its a plugin and i dont have source of mainprog to change all the openfile stuff ;( damn
I have tested to open the delete protected file direct with excel and this works but when i change manually any val and want to save/update the file, excel will create some temp files and will hang on, because excel try to delete the file and write its new... this failed every time when user has no deleting permission.
i really need your help! THANKS!
HELP! read/write XLS file but dont delete!?
Re: HELP! read/write XLS file but dont delete!?
here is a small link to a german page where ppl discuse about the same prob. shit, windows 
http://www.mcseboard.de/archiv/28/2003/05/3/8622
btw is there any parameter for word that forbid to delete all file?

http://www.mcseboard.de/archiv/28/2003/05/3/8622
btw is there any parameter for word that forbid to delete all file?
-
- User
- Posts: 30
- Joined: Wed Aug 06, 2003 5:52 pm
- Location: Florida, USA
File System
Under the NTFS file system, there are advanced file rights management and true ownership tracking. This would pertain to WinNt, 2000, and XP systems with NTFS installed. Under FAT file structures, you only have flags for archive, read only, hidden, and system files. The operating system merely alerts you if you attempt to delete or more a "protected" file or stops you if you try the same thing with a "shared" file.
If you can write to a file, you have the power to delete it. After all, you could just force an EOF() at the start of the file and its contens are gone. Or you could overwrite its contents and render it useless. It;s sort of like having two car keys, one to the doors and ignition, and the other to the trunk and glove compartment. If you have the one, why be so concerned about the other? The same with the distinction between being able to write to a file and to delete it. One gives you all the real power, so the other is rather insignificant. I've even found that while you can't delete a file, you can still rename it, which in effect causes the original to cease to exist..
Users usually do not go out of their way to hurt themselves, meaning they do not consciously do things that undermind their purpose. Maybe by accident, but that is usually by not giving the user enough information to keep them from doing something wrong. As a rule though, users are either reluctant or afraid to remove anything from their PCs, out of concern that they will break something and be found to be stupid or ignorant. In other words, this is usually an insignificant problem. Mostly because you control what the user is able to put in that file. And if it really bothers you, you can always create a backup directory and backup copies of the files that can be compared against, and the better version used as the master to recreate any that are not alike.
If you can write to a file, you have the power to delete it. After all, you could just force an EOF() at the start of the file and its contens are gone. Or you could overwrite its contents and render it useless. It;s sort of like having two car keys, one to the doors and ignition, and the other to the trunk and glove compartment. If you have the one, why be so concerned about the other? The same with the distinction between being able to write to a file and to delete it. One gives you all the real power, so the other is rather insignificant. I've even found that while you can't delete a file, you can still rename it, which in effect causes the original to cease to exist..
Users usually do not go out of their way to hurt themselves, meaning they do not consciously do things that undermind their purpose. Maybe by accident, but that is usually by not giving the user enough information to keep them from doing something wrong. As a rule though, users are either reluctant or afraid to remove anything from their PCs, out of concern that they will break something and be found to be stupid or ignorant. In other words, this is usually an insignificant problem. Mostly because you control what the user is able to put in that file. And if it really bothers you, you can always create a backup directory and backup copies of the files that can be compared against, and the better version used as the master to recreate any that are not alike.
Has-been Wanna-be (You may not like what I say, but it will make you think)
Just chflags sunlnk the file.... Oh yea, and use FreeBSD 
For Windows I don't think there is any hope for this one... Sorry!

For Windows I don't think there is any hope for this one... Sorry!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net