[SATLUG] Re: Programming file permissions

Ernest De Leon edeleonjr at gmail.com
Fri Apr 4 11:06:16 CDT 2008


You can define the POSIX permissions in your program, but Windows does not
natively understand these permission sets.  You will have to include logic
to map the POSIX permission sets to Windows ACLs.  There are more advanced
tools for this as you move up into Active Directory Services and such, but
for a small app that is going to be run locally, it makes no sense to code
with that level of complexity let alone assume that the machines will all be
bound to a Windows AD domain.  This is a fundamental problem with permission
sets in mixed environments.  Some vendors have been able to overcome this by
coding extensive permission mapping rules, others have been less successful
at it.

Ernest

On Fri, Apr 4, 2008 at 8:37 AM, Frank Huddleston <fhuddles at yahoo.com> wrote:

> In reference to the original message:
>
>   I am trying to write a program for both Linux and Windows. I would like
>   to create a file that restricts read/write permissions to the owner.
>   ...
>   I want to do that within a C++ program. Does anyone have any idea how
>   to do this?
>
> Isn't this what POSIX was designed to handle? Couldn't you use the same
> POSIX functions to handle both the Linux and the Windows files?
> I'm not speaking from experience of actually having used these functions,
> however: just from some notion of the original intention of POSIX.
>
> Frank Huddleston
>
>
>
>
> --
> _______________________________________________
> SATLUG mailing list
> SATLUG at satlug.org
> http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
> Powered by Rackspace (www.rackspace.com)
>



-- 
Ernest de Leon
http://www.smbtechadvice.com

"They who can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - A common 18th Century sentiment
voiced by Benjamin Franklin

"A patriot must always be ready to defend his country against his
government." - Edward Abbey

"All that is necessary for evil to triumph is for good men to do nothing." -
Edmund Burke, English statesman and political philosopher (1729-1797)


More information about the SATLUG mailing list