Access rights?

Started by
3 comments, last by Tree Penguin 18 years, 11 months ago
Hi, is it possible in some way to read and write to files the logged in user has no access to?
Advertisement
I sure hope not, unless the program doing so is running as a different user. Otherwise, it somewhat defeats the purpose of not giving that user access to those files...
Short: No.

Long: Programs have the samer permission as the user who started them (ok you can start apps under another user but then they just have that set of permissions so no biggie). They can't read/write to any files their user can't read/write to. Basically you can think of new processes as new users to the system - there really isn't much (any?) difference between a program and a user. Anything a user can do a program can and the opposite. So if your user can't access a file your programs can't.
yes - but the program must be able to impersonate a user with the rights. In Windows this is done via tokens. [Google] for tools like "runas". In Win32API calls to CreateProcessWithLogon will probably be required.
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
Ok, thanks.

This topic is closed to new replies.

Advertisement