Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Take ownership of folders in Win2008 via command line?

Reply
Thread Tools Display Modes

Take ownership of folders in Win2008 via command line?

 
 
Whiteford
Guest
Posts: n/a

 
      05-04-2010
Hi,

I need to take ownership of a huge folder on our Windows 2008 server. I
have restored 1TB of data but the GUI tool keeps prompting for me to skip
etc. Can I use a command line tool to five the system account full
ownership of all files?

Thanks

 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      05-04-2010


"Whiteford" <> wrote in message
news:...
> Hi,
>
> I need to take ownership of a huge folder on our Windows 2008 server. I
> have restored 1TB of data but the GUI tool keeps prompting for me to skip
> etc. Can I use a command line tool to five the system account full
> ownership of all files?
>
> Thanks


Under Win7 I would use takeown.exe. If this command does not exist under
Win2008 then you can probably copy it across from a Win7 PC.

 
Reply With Quote
 
Whiteford
Guest
Posts: n/a

 
      05-04-2010
Thanks it does have this tool!

However when I use it I get the error "info: the current logged on user does
not have ownership privileges on the file (or folder): ("f:\folderername")

and

INFO: Access is denied. ( "f:\foldername" )

Shouldn't this tool take control?

"Pegasus [MVP]" <> wrote in message
news:...
>
>
> "Whiteford" <> wrote in message
> news:...
>> Hi,
>>
>> I need to take ownership of a huge folder on our Windows 2008 server. I
>> have restored 1TB of data but the GUI tool keeps prompting for me to skip
>> etc. Can I use a command line tool to five the system account full
>> ownership of all files?
>>
>> Thanks

>
> Under Win7 I would use takeown.exe. If this command does not exist under
> Win2008 then you can probably copy it across from a Win7 PC.


 
Reply With Quote
 
Whiteford
Guest
Posts: n/a

 
      05-04-2010

It seemed to work on this folder if I added the "system" account via the GUI
first then run the takeown tool, how can I then add the "system" account to
all folders and directories first via the command line then take ownership?

"Pegasus [MVP]" <> wrote in message
news:...
>
>
> "Whiteford" <> wrote in message
> news:...
>> Hi,
>>
>> I need to take ownership of a huge folder on our Windows 2008 server. I
>> have restored 1TB of data but the GUI tool keeps prompting for me to skip
>> etc. Can I use a command line tool to five the system account full
>> ownership of all files?
>>
>> Thanks

>
> Under Win7 I would use takeown.exe. If this command does not exist under
> Win2008 then you can probably copy it across from a Win7 PC.


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      05-04-2010

The trusty old cacls command will do it:

cacls "d:\User Files" /e /t /c /g system:f

On Windows 7, cacls still works but is deprecated. icacls.exe should be used
instead.

"Whiteford" <> wrote in message
news:...
> It seemed to work on this folder if I added the "system" account via the
> GUI first then run the takeown tool, how can I then add the "system"
> account to all folders and directories first via the command line then
> take ownership?
>
> "Pegasus [MVP]" <> wrote in message
> news:...
>>
>>
>> "Whiteford" <> wrote in message
>> news:...
>>> Hi,
>>>
>>> I need to take ownership of a huge folder on our Windows 2008 server. I
>>> have restored 1TB of data but the GUI tool keeps prompting for me to
>>> skip etc. Can I use a command line tool to five the system account full
>>> ownership of all files?
>>>
>>> Thanks

>>
>> Under Win7 I would use takeown.exe. If this command does not exist under
>> Win2008 then you can probably copy it across from a Win7 PC.

>

 
Reply With Quote
 
Whiteford
Guest
Posts: n/a

 
      05-04-2010

I still get access denied on folders if I use:

cacls "d:\User Files" /e /t /c /g system:f

Do I need to take ownership first?

as it is Win2008 should I use icacls instead?

"Pegasus [MVP]" <> wrote in message
news:#ckmG$...
> The trusty old cacls command will do it:
>
> cacls "d:\User Files" /e /t /c /g system:f
>
> On Windows 7, cacls still works but is deprecated. icacls.exe should be
> used instead.
>
> "Whiteford" <> wrote in message
> news:...
>> It seemed to work on this folder if I added the "system" account via the
>> GUI first then run the takeown tool, how can I then add the "system"
>> account to all folders and directories first via the command line then
>> take ownership?
>>
>> "Pegasus [MVP]" <> wrote in message
>> news:...
>>>
>>>
>>> "Whiteford" <> wrote in message
>>> news:...
>>>> Hi,
>>>>
>>>> I need to take ownership of a huge folder on our Windows 2008 server.
>>>> I have restored 1TB of data but the GUI tool keeps prompting for me to
>>>> skip etc. Can I use a command line tool to five the system account
>>>> full ownership of all files?
>>>>
>>>> Thanks
>>>
>>> Under Win7 I would use takeown.exe. If this command does not exist under
>>> Win2008 then you can probably copy it across from a Win7 PC.

>>

 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      05-04-2010
Yes, take ownership first. It is up to you whether you use cacls.exe or
icacls.exe.

"Whiteford" <> wrote in message
news:...
> I still get access denied on folders if I use:
>
> cacls "d:\User Files" /e /t /c /g system:f
>
> Do I need to take ownership first?
>
> as it is Win2008 should I use icacls instead?
>
> "Pegasus [MVP]" <> wrote in message
> news:#ckmG$...
>> The trusty old cacls command will do it:
>>
>> cacls "d:\User Files" /e /t /c /g system:f
>>
>> On Windows 7, cacls still works but is deprecated. icacls.exe should be
>> used instead.
>>
>> "Whiteford" <> wrote in message
>> news:...
>>> It seemed to work on this folder if I added the "system" account via the
>>> GUI first then run the takeown tool, how can I then add the "system"
>>> account to all folders and directories first via the command line then
>>> take ownership?
>>>
>>> "Pegasus [MVP]" <> wrote in message
>>> news:...
>>>>
>>>>
>>>> "Whiteford" <> wrote in message
>>>> news:...
>>>>> Hi,
>>>>>
>>>>> I need to take ownership of a huge folder on our Windows 2008 server.
>>>>> I have restored 1TB of data but the GUI tool keeps prompting for me to
>>>>> skip etc. Can I use a command line tool to five the system account
>>>>> full ownership of all files?
>>>>>
>>>>> Thanks
>>>>
>>>> Under Win7 I would use takeown.exe. If this command does not exist
>>>> under Win2008 then you can probably copy it across from a Win7 PC.
>>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Shared folders and retaining share and file permissions Bry M Server Networking 7 03-24-2010 01:12 PM
Move \Users folder once for all Peter Meinl Windows Vista Installation 25 03-03-2010 01:37 AM
RE: Getting Local Folders Back In Windows Live Mail gwmbox Windows Live Mail 8 12-09-2009 10:29 PM
Using Storage Folders Instead of Default Folders Peter Dryton Windows Live Mail 9 10-26-2009 12:21 PM
Taking ownership of Vista files and folders from an XP machine KapitiTech Windows Vista Administration 3 10-30-2007 06:44 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59