I need to grant full access permissions on folder using (deprecated on win7) Cacls. It seems to me that i have to use with cacls localized usernames and groupnames. E.g.:
cacls foldername /T /E /C /G Users:F
This gave me error "No mapping between account names and security IDs was done". And next command works fine (users in russian = Пользователи).
cacls foldername /T /E /C /G Пользователи:F
How can i grant full permissions on folder regardless of the system language?
Use
xcacls
instead as described here and use SIDs instead of names (you will find well known sids here)If you for some reason are stuck with cacls, then
google: cacls sid
will bring you some workarounds how to do reverse mapping from sid to name and then supply this to caclsEdit: could not resist to learn some new tricks... this simple script will give you actual name of 'Users'
(S-1-5-32-545)
group on a given PC:Put it into a file with vbs extension (Let's assume
usersName.vbs
).Now run:
Done :-)
Edit: corrected to work if name has space in (added
delims=
). Please also note that echo Y at the start works if you use English version of the tool.