change permissions

Who is the DOS command line expert? Or is there another way to do what I need, maybe a SQL script? From inside a program I want to change permissions on a directory and all the files in it, say d:\psoft\payroll\files. The program will be running under the service account but I want to grant access to an individual user id "abcdefg". Can I use the chmod command (chmod 600 d:\psoft\payroll\files)? If so, I don't remember userid being a part of the parameter list for that command. How do I set permissions for a specific user?
Dennis MillerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve KnightIT ConsultancyCommented:
Assuming a command prompt within windows 200x then you need to use the cacls command.


d:\psoft\payroll\files /e /t /g  abcdefg:F

to give full control or change the F to a C to add as change.  This will be inherited down from that point on W2K/2003/XP


Steve KnightIT ConsultancyCommented:
Oops, with CACLS at the beginning of that line, i.e.

CACLS d:\psoft\payroll\files /e /t /g  abcdefg:F

/e Adds your choice to the existing ACL for the directory
/t All files and subdirectories too
/g grant permissions to the following user object (specify as domain\user if a domain user)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Can you use the cacls.exe command?

Maybe something like this:

cacls d:\psoft\payroll\files /G: abcdefg:R

Good Luck,
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

You can also use xcacls from the resource kit. For example the command
     XCACLS d:\psoft\payroll\files /E /T /G abcdefg:F
will give the user abcdefg full control to d:\psoft\payroll\files and all subdirectories.

see for more information

xcacls has some more possibilities setting rights over cacls.
Didn't see your post dragon-it. Please ignore my post.
Steve KnightIT ConsultancyCommented:
Thanks for the points & grade.  Boy do you have to be quick in this T/A, lucky I suppose, was just passing !!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft DOS

From novice to tech pro — start learning today.