rjones Posted November 23, 2009 Posted November 23, 2009 Hi, I am trying to use the CACLS.exe command to modify ACL's in my user directory. When I run the command it lists the directories, but, comes up after with access denied. Heres my script... cacls "D:\Userdata" /t /e /g "Administrators":F obviously replacing "d:\userdata" with the user data directory Any Ideas?!
rjones Posted November 24, 2009 Author Posted November 24, 2009 Hi, Thanks for your reply. I was hoping to change the ACL's without having to take ownership. Going to try and add this script to a logon script... hoping that as the user has full access rights, that they should be able to change permissions. If not will give your suggestion a go. Thank you once again!
srochford Posted November 24, 2009 Posted November 24, 2009 If you're expecting the user running the script to be owner then it will do no harm to forcibly set the owner - if they're already owner, it makes no change. If they're not owner then you make them owner and allow the permissions change.
SteveCIS Posted November 24, 2009 Posted November 24, 2009 (edited) Hi, I don't think you need the speech marks around Administrators. Below is a line from a script which works and I have deployed using a GPO. cacls "c:\Program Files\Sherston\Money Mice\saves" /e /g everyone:c Only the path is in speech marks. Hope that helps, Steve. Edited November 24, 2009 by SteveCIS
srochford Posted November 24, 2009 Posted November 24, 2009 Hi, I don't think you need the speech marks around Administrators. Below is a line from a script which works and I have deployed using a GPO. cacls "c:\Program Files\Sherston\Money Mice\saves" /e /g everyone:c Only the path is in speech marks. You don't need them but it doesn't matter. If you wanted to do (say) domain users then you would need the quotes - I'd guess if you get into the habit of always using them then you won't miss them off when they are needed :-)
ChrisH Posted November 24, 2009 Posted November 24, 2009 You don't need them but it doesn't matter. If you wanted to do (say) domain users then you would need the quotes - I'd guess if you get into the habit of always using them then you won't miss them off when they are needed :-) or if your like me you never use spaces when your naming stuff if you can help it. This includes paths group names etc. Bloody spaces are more trouble than they are worth
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now