reset ntfs partition permissions
reset ntfs partition permissions
hi
i need a tool can integrate to right click menu and reset ntfs permissions for files and folders any suggestions?
===
windows xp
i need a tool can integrate to right click menu and reset ntfs permissions for files and folders any suggestions?
===
windows xp
Re: reset ntfs partition permissions
So no command line?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: reset ntfs partition permissions
well, it will be good if it can reset the entire partition
====
even individual folders it would be good
====
even individual folders it would be good
Last edited by yusef88 on 14 Jul 2014 21:30, edited 1 time in total.
Re: reset ntfs partition permissions
I was lucky to download FileACL 3.0.1.6 some years ago, when the website was still up. http://archive.today/pnb1o
These are the line that I use, in sequence, to totally reset the permissions of a drive X. You have to run them with admin privileges.
These are the line that I use, in sequence, to totally reset the permissions of a drive X. You have to run them with admin privileges.
Code: Select all
fileacl X:\ /o Administrator /sub /files /force
fileacl X:\ /s Administrator:F /replace /force
fileacl X:\ /replace /inherit /noroot /sub /files /force
- Attachments
-
- Fileacl 3.0.1.6.zip
- (176.86 KiB) Downloaded 352 times
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: reset ntfs partition permissions
wow, very easy to use.very thanks dear Marco
==
if i put it in <xydata> directory possible to make it work with selected folders by XY scripts?
=
or for simplification, make the script let me choose which drive letter to reset
==
if i put it in <xydata> directory possible to make it work with selected folders by XY scripts?
=
or for simplification, make the script let me choose which drive letter to reset
Re: reset ntfs partition permissions
Yes
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: reset ntfs partition permissions
small problem i just test it on a folder, after applying to 2 partitions i lost access to them and i had to restore their permissions manually
- Attachments
-
- 2.png (30.38 KiB) Viewed 5572 times
Re: reset ntfs partition permissions
Natural. You first reset the permissions with those lines: the Admin obtains full access. Then you should grant full access to yourself as well.
You could also try by substituting Administrator with Everyone in those lines (never tested myself tho).
You could also try by substituting Administrator with Everyone in those lines (never tested myself tho).
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Re: reset ntfs partition permissions
i found something interesting "Bypass NTFS permissions" http://www.hobeanu.com/accessgain/
now i need your help to make this command work with selected folder
=====
update i made a batch file and use it by openwith script
ه really appreciate your help Marco
now i need your help to make this command work with selected folder
Code: Select all
CACLS folderpass /t /C /G Everyone:F
update i made a batch file and use it by openwith script
ه really appreciate your help Marco
Re: reset ntfs partition permissions
Code: Select all
foreach($folder, "<get SelectedItemsPathNames |>", "|") {
if (exists($folder) == 2) { run """%COMSPEC%"" /k CACLS ""$folder"" /T /C /G Everyone:F", 2, 0; }
}
One of my scripts helped you out? Please donate via Paypal
Re: reset ntfs partition permissions
good script..thanks highend
Re: reset ntfs partition permissions
I'm currently writing something more "sophisticated"...
It uses ICALCS (CALCS is deprecated since Vista...)
but it will need a helper application (because I don't use
an elevated XY instance all the time).
Let's see if I can solve it with a small .vbs script (no external tool would be required).
Btw, if the current "script" works for you, you should replace the "/k" with "/c" at least
if you don't want to create a lot of dos boxes when you select more than one folder.
It uses ICALCS (CALCS is deprecated since Vista...)
but it will need a helper application (because I don't use
an elevated XY instance all the time).
Let's see if I can solve it with a small .vbs script (no external tool would be required).
Btw, if the current "script" works for you, you should replace the "/k" with "/c" at least
if you don't want to create a lot of dos boxes when you select more than one folder.
One of my scripts helped you out? Please donate via Paypal
Re: reset ntfs partition permissions
it works with folders only, this batch works with both files and folders and show if access is denied
Code: Select all
@echo off
:a
if exist "%~1\nul" cd /d %1&set sub=/T
title ResetNTFSPermissions CACLS
echo This will REPLACE all the NTFS permissions to EVERYONE incuding all subfolders
echo (or run the command manually with /E to Edit ACL instead of replacing it)
echo ---
echo CACLS %1 %sub% /C /G Everyone:F
echo ---
CACLS %1 %sub% /t /C /G Everyone:F
shift
set g=hiren%1
if %g%==hiren goto e
goto a
:e
Pause
Re: reset ntfs partition permissions
1. Autoelevating
2. Translations
3. Could be enhanced with an inputselect() to decide which commands should be executed
2. Translations
3. Could be enhanced with an inputselect() to decide which commands should be executed
Code: Select all
/*
/T = Recusive
/C = Continue in case of any file errors
/Q = Don't show a message for each file / folder
/grant:r = Replace permissions instead of adding them
(OI) = Object inheritance (Vererbung für Dateien)
(CI) = Container inheritance (Vererbung für Ordner)
F = Full
*/
// End if no files / folders are selected
$selectedItems = "<get SelectedItemsPathNames |>";
if ($selectedItems == "") {
status "No item(s) selected, aborted!", "FF0000", "stop";
end(true);
}
$batFile = "%TEMP%\~icacls.bat";
$getAdminVBSFile = "%TEMP%\~GetAdmin.vbs";
// Get client language
$languageID = regexmatches(runret("""%COMSPEC%"" /c REG QUERY ""HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language"" /v ""InstallLanguage"""), "\d{4}");
// Translation
$groupList = "Administrators|Users|Everyone";
if ($languageID == "0407") { // German
$localizedGroupList = "Administratoren|Benutzer|Jeder";
} else { // Fallback to english
$localizedGroupList = $groupList;
}
// Possible ICACLS commands
$acl_Options = " /T /C /Q";
$acl_Reset_Full = replacelist("/grant:r Everyone:(OI)(CI)F", $groupList, $localizedGroupList, "|");
$acl_Add_Admin = replacelist("/grant Administrators:(OI)(CI)F", $groupList, $localizedGroupList, "|");
$acl_Add_CurUser = "/grant %USERNAME%:(OI)(CI)F";
// Edit this list if you want to add / remove commands to process
// Ofc you need to add additional variables right over this comment...
$aclProcessList = '$acl_Reset_Full|$acl_Add_Admin|$acl_Add_CurUser';
$batchCommands = "";
foreach($item, $selectedItems, "|") {
$cmdOptions = "";
foreach($entry, $aclProcessList, "|") {
$entry = eval($entry); // Resove the variable names
$cmd = "@ICACLS " . quote($item) . " " . $entry . $acl_Options;
$cmdOptions = $cmdOptions . "@ECHO [Options: $entry]<crlf>" . $cmd . "<crlf>" . "@ECHO." . "<crlf>";
}
$batchCommands = $batchCommands . "@ECHO [$item]<crlf>" . $cmdOptions . "<crlf>" . "@ECHO.<crlf>@ECHO.<crlf>";
}
writefile($batFile, $batchCommands); // Write the .bat file
$getAdminVBS = <<<>>>
Set UAC = CreateObject("Shell.Application")
UAC.ShellExecute "%COMSPEC%", "/k ""$batFile""", "", "runas", 1
>>>;
writefile($getAdminVBSFile, trim($getAdminVBS));
run """cscript"" ""$getAdminVBSFile""", , 0, 0;
One of my scripts helped you out? Please donate via Paypal
Re: reset ntfs partition permissions
sorry to tell you it failed to unlock inaccessible file in win7 but Take ownership can
http://www.askvg.com/add-take-ownership ... ows-vista/
http://www.askvg.com/add-take-ownership ... ows-vista/