Welcome Guest! To access all forums & features, please register an account or sign-in. → Why register?



taking ownership of files in win7 by formatting hdd


48 replies to this topic - - - - -

#1 Tilt090

    Invisagod

  • 436 posts
  • Joined: 08-August 04

Posted 24 June 2012 - 05:16

i have about 200 gb of data and 300 gb free on a single 500 gb hdd. ive installed quite a few OSes on this hdd and so permissions are screwed up on my personal folders. now i need to fix the permissions and i think a format is in order.. but i can only do it one partition at a time since i dont have another hdd lying around.

so whats the best way of taking back the ownership of files and folders for good.. is a format necessary or not?


#2 FalsePositive

  • 719 posts
  • Joined: 29-May 09

Posted 24 June 2012 - 06:02

You don't back up your data? :woot:

#3 OP Tilt090

    Invisagod

  • 436 posts
  • Joined: 08-August 04

Posted 24 June 2012 - 07:05

View PostFalsePositive, on 24 June 2012 - 06:02, said:

You don't back up your data? :woot:

not really. last time was 2009 i think

#4 OP Tilt090

    Invisagod

  • 436 posts
  • Joined: 08-August 04

Posted 24 June 2012 - 07:06

is formatting the best way to set the permissions right?

#5 FalsePositive

  • 719 posts
  • Joined: 29-May 09

Posted 24 June 2012 - 07:16

http://support.microsoft.com/kb/308421 for XP but with some slight modification, will work on 7

Windows Registry Editor Version 5.00
; Add "Take Ownership" to options in files and folders context menu.
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
Save as a .bat or .cmd. Merge. Right click a file or folder and Take Ownership.

The best way to reset the permissions is to move them to a fat32 partition and then move them back. Formatting yes but where are you going to put the files while you are formatting?

You need to invest in a separate physical drive(external or internal) to back up your data and do things like I mentioned above.

#6 Ryoken

    The Other Other White Meat

  • 2,221 posts
  • Joined: 10-September 09
  • Location: Nova Scotia, Canada
  • OS: Windows 7 x64, MacOS 10.8
  • Phone: iPhone 4S, Nexus 7

Posted 24 June 2012 - 07:21

This worked in 7 for me..

http://www.howtogeek...-menu-in-vista/

There are a few others out there.. Basicly it adds a right click command for taking ownership of a folder.. so if it's a full partition, select all in the root and do it..

#7 OP Tilt090

    Invisagod

  • 436 posts
  • Joined: 08-August 04

Posted 24 June 2012 - 07:22

View PostFalsePositive, on 24 June 2012 - 07:16, said:

http://support.microsoft.com/kb/308421 for XP but with some slight modification, will work on 7

Windows Registry Editor Version 5.00
; Add "Take Ownership" to options in files and folders context menu.
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
Save as a .bat or .cmd. Merge. Right click a file or folder and Take Ownership.

The best way to reset the permissions is to move them to a fat32 partition and then move them back. Formatting yes but where are you going to put the files while you are formatting?

You need to invest in a separate physical drive(external or internal) to back up your data and do things like I mentioned above.

what if i partition my drive this way c: OS win7 100 gb ntfs d: 200gb ntfs e: 200 gb fat32. and shift all data to E: and then back to d: ?

#8 OP Tilt090

    Invisagod

  • 436 posts
  • Joined: 08-August 04

Posted 24 June 2012 - 07:23

View PostRyoken, on 24 June 2012 - 07:21, said:

This worked in 7 for me..

http://www.howtogeek...-menu-in-vista/

There are a few others out there.. Basicly it adds a right click command for taking ownership of a folder.. so if it's a full partition, select all in the root and do it..

in root? you mean run as administrator?

#9 OP Tilt090

    Invisagod

  • 436 posts
  • Joined: 08-August 04

Posted 24 June 2012 - 07:27

if i just format c: and reinstall win7 after transferring the personal folders to a separate partition wont that also fix permissions?

#10 rfirth

    Software Engineer

  • 3,056 posts
  • Joined: 11-September 09
  • Location: Baton Rouge, Louisiana
  • OS: Windows 8
  • Phone: Nokia Lumia 800

Posted 24 June 2012 - 07:31

View PostTilt090, on 24 June 2012 - 07:23, said:

in root? you mean run as administrator?

The root of a directory...

#11 omganinja

    Resident Elite

  • 1,161 posts
  • Joined: 02-June 07
  • Location: Brisbane, Australia

Posted 24 June 2012 - 07:35

View PostTilt090, on 24 June 2012 - 07:23, said:

in root? you mean run as administrator?

He means in the root of the directory. ie C:\

#12 unknownsoldierX

    Neowinian³

  • 368 posts
  • Joined: 09-March 05

Posted 24 June 2012 - 07:35

You can do this to reset permissions and ownership back to defaults:

Open a command prompt as administrator.

cd /d x:
replace x with the drive letter of the partition you want to reset.

icacls * /T /Q /C /RESET


#13 OP Tilt090

    Invisagod

  • 436 posts
  • Joined: 08-August 04

Posted 24 June 2012 - 07:38

unknownsoldierx will try this one out.

ryoken i tried it but it still saying you don't have permission.

#14 OP Tilt090

    Invisagod

  • 436 posts
  • Joined: 08-August 04

Posted 24 June 2012 - 07:49

View PostunknownsoldierX, on 24 June 2012 - 07:35, said:

You can do this to reset permissions and ownership back to defaults:

Open a command prompt as administrator.

cd /d x:
replace x with the drive letter of the partition you want to reset.

icacls * /T /Q /C /RESET

will this take care of the sub directories and files as well?

#15 unknownsoldierX

    Neowinian³

  • 368 posts
  • Joined: 09-March 05

Posted 24 June 2012 - 07:54

Yes. It should reset all folders and files on the partition to default permissions and ownership.