Re: privilage exception raised during execution
Re: privilage exception raised during execution
- Subject: Re: privilage exception raised during execution
- From: Mike Fischer <email@hidden>
- Date: Sat, 24 Jun 2006 21:26:56 +0200
Am 24.06.2006 um 21:03 schrieb "narender pal singh panwar"
<email@hidden>:
Hi
I want to install my application such that every user on ther
system should
have Read & Write permission to my application's folder.
Wrong, wrong, wrong!
I am writing to some files regularly during execution.
Assuming "some files" are inside your application package see above.
The problem is when I installed application with one user and then
login
with other user account than privilage exception is raised.
Which is what is perfectly correct and intended to work that way.
Is there any way to solve this problem.
Yes, fix your application to only write to the approved directories
(like ~/Library/Preferences or ~/Library/Application Support, their
counterparts at /Library/... or /tmp (or even /var/... if you must)
for example, depending on what type of information you're writing.
There are a number of good reasons for this but one is that it may
not even be possible to write to the application even with the
correct permissions and authorization because the volume it's on is
read only.
Another is that two instances of your application might run on the
same machine in different user contexts which will probably scramble
the files you're writing to unless you are taking great care to
ensure proper locking.
A third is that standard users SHOULD not be able to modify your
application for security reasons. Anybody who sets up a system to use
standard (non-admin) users does this for a reason and you don't want
to make their efforts be in vain. I'd throw out any app I'd catch
violating these rules.
This topic has been discussed numerous times on the Carbon-dev
mailing list. Check out the archives for more good reasons and
correct solutions to the problem. Hint: Use FSFindFolder() to find
suitable directories for saving your data.
HTH
Mike
--
Mike Fischer Softwareentwicklung, EDV-Beratung
Schulung, Vertrieb
Web: <http://homepage.mac.com/mike_fischer/index.html>
Note: I read this list in digest mode!
Send me a private copy for faster responses.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden