[SATLUG] Programming file permissions

Bruce Dubbs bruce.dubbs at gmail.com
Wed Apr 2 17:32:04 CDT 2008


Ernest De Leon wrote:
> you will need to have the C++ proggy call the shell (CMD) and run a cacls
> command (just google cacls)  you should be able to do what you want through
> there.  My only advice is to be mindful of how win acls lay down vs posix
> ones.  One of the biggest headaches storage vendors run into when trying to
> emulate windows server shares that run on top of linux file systems is the
> posix to winacl mappings.

Thanks Ernest.  That's a start.  It looks like I can do

   echo Y|cacls /E /R user  filename

Now if I can figure out who is the owner (so I don't remove permissions) 
and what the other "users" are, I'm all set.  I suppose I can get the 
owner via DIR /Q filename.

I'd really like to not have to parse the verbose output that cacls and 
dir create.

   -- Bruce

>>>  BTW, did I say before that Windows is a PITA?


More information about the SATLUG mailing list