Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

Windows Server 2000/2003 Post your questions relating to the joys of Windows Server 2000/2003 here.

Go Back   EduGeek.net Forums > Technical > Windows Server 2000/2003
Reply
 
LinkBack Thread Tools Search Thread
Sponsored Links
Old 23-11-2009, 07:45 PM   #1
 
rjones's Avatar
 
Join Date: Sep 2009
Posts: 20
uk
Thanks: 15
Thanked 0 Times in 0 Posts
Rep Power: 0 rjones is an unknown quantity at this point
Default CACLS Command - Access Denied

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?!
  Reply With Quote
Old 23-11-2009, 08:37 PM   #2
 
jinnantonnix's Avatar
 
Join Date: Nov 2007
Location: South Wales
Posts: 1,000
uk uk wales
Thanks: 25
Thanked 139 Times in 121 Posts
Blog Entries: 5
Rep Power: 37 jinnantonnix is a splendid one to behold jinnantonnix is a splendid one to behold jinnantonnix is a splendid one to behold jinnantonnix is a splendid one to behold jinnantonnix is a splendid one to behold jinnantonnix is a splendid one to behold jinnantonnix is a splendid one to behold jinnantonnix is a splendid one to behold
Default

Looks like you need to take ownership of the files.

I'm at home on Linux, so I can't try anything, but I think you should take a look at ICACLS with the /setowner option.

ICACLS is like CACLS on steroids.

Icacls
  Reply With Quote
Thanks to jinnantonnix from:
rjones (24-11-2009)
Old 24-11-2009, 07:36 AM   #3
 
rjones's Avatar
 
Join Date: Sep 2009
Posts: 20
uk
Thanks: 15
Thanked 0 Times in 0 Posts
Rep Power: 0 rjones is an unknown quantity at this point
Default

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!
  Reply With Quote
Old 24-11-2009, 09:03 AM   #4
 
srochford's Avatar
 
Join Date: Aug 2005
Location: London
Posts: 2,259
uk
Thanks: 46
Thanked 315 Times in 278 Posts
Blog Entries: 1
Rep Power: 72 srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future
Default

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.
  Reply With Quote
Old 24-11-2009, 02:37 PM   #5
 
SteveCIS's Avatar
 
Join Date: Nov 2009
Location: Lymington
Posts: 5
uk uk england
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0 SteveCIS is an unknown quantity at this point
Default

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.

Last edited by SteveCIS; 24-11-2009 at 05:22 PM..
  Reply With Quote
Old 24-11-2009, 05:46 PM   #6
 
srochford's Avatar
 
Join Date: Aug 2005
Location: London
Posts: 2,259
uk
Thanks: 46
Thanked 315 Times in 278 Posts
Blog Entries: 1
Rep Power: 72 srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future
Default

Quote:
Originally Posted by SteveCIS View Post
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 :-)
  Reply With Quote
Old 24-11-2009, 06:40 PM   #7
 
ChrisH's Avatar
 
Join Date: Jun 2005
Location: East Lancs
Posts: 4,415
uk uk lancashire
Thanks: 21
Thanked 101 Times in 92 Posts
Rep Power: 35 ChrisH is a glorious beacon of light ChrisH is a glorious beacon of light ChrisH is a glorious beacon of light ChrisH is a glorious beacon of light ChrisH is a glorious beacon of light ChrisH is a glorious beacon of light
Default

Quote:
Originally Posted by srochford View Post
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
  Reply With Quote
Reply

EduGeek.net Forums > Technical > Windows Server 2000/2003

Similar Threads
Thread Thread Starter Forum Replies Last Post
Photostory Access denied error. ICT_GUY Windows 19 Today 02:37 PM
Access Denied - Backup Exec 12 Geek_of_HeathMount Windows Server 2008 0 21-10-2009 01:14 PM
RIS Access denied file in use kevin_lane Windows 0 07-01-2009 10:17 AM
Access Denied from Admin Network MrDylan ICT KS3 SATS Tests 9 25-04-2006 12:09 PM



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:16 PM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright EduGeek.net




website uptime

© 2005 - 2009 EduGeek.net
SERVER: 4
no new posts