Click to See Complete Forum and Search --> : How to stop a program from accessing the file system
gogoc
May 19th, 2008, 12:07 PM
I don't want my programs to access the file system at all
means no file creation, no deletion not even the a single stream for accessing files.
how can i do that
Ajay Vijay
May 19th, 2008, 12:38 PM
It seems you are going to prepare FAQS on "How to restrict a program...."
Duoas
May 19th, 2008, 12:44 PM
In interpreted language environments, you often have the option to create a "sandbox" interpreter. However, the actual process still has the same permissions and accesses as any other executable process.
For compiled programs like C++, you have to create that sandbox using features of the OS --which, obviously, is entirely platform-dependent.
On windows, you can control group policy permissions and program access rights.
Good luck.
GCDEF
May 19th, 2008, 12:44 PM
Err.... Don't write any code that access file?
gogoc
May 19th, 2008, 12:45 PM
heheh
no actually i have to check some code in y college
for that i need help
thanks 2 u all 4r helping me
Ajay Vijay
May 19th, 2008, 12:49 PM
Unique education system! We learnt "how to" and your college asks you to learn "How to prevent".
Pretty advanced! ;)
gogoc
May 19th, 2008, 12:54 PM
no they dont want it
i wan it to do that so that it will become easy and even i can learn some thing
Ajay Vijay
May 19th, 2008, 12:58 PM
But that's not proper way of learning. First learn (if you dont know) how-to do something, then advanced concepts with that, followed by some real world developement.
At codeguru, we offer solutions to some problems (homework assisgments are generally ignored); and not this how NOT to !
Lindley
May 19th, 2008, 01:13 PM
Run it on a different machine. Then it'll never be able to touch your filesystem.
Seriously, what possible use would such a restriction be?
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.