Hi
i followed a tutorial on how to make folders unacessible and undelitable using cacls command
everything works fine until today i was unable to access a folder in D drive , D:\mouad

"
C:\Windows\system32>cacls D:\mouad /e /c /g %username%:D
Arguments non valides.
REMARQUE : Cacls étant désapprouvé, utilisez Icacls.
"

anyway i can get full access too my folder again ? please ?

Dani AI

Generated

A short, practical addendum based on what happened here: accidentally removed access to D:\mouad using an ACL change, and ’s suggestion to boot a Linux (Ubuntu) live USB to copy the files out was a safe, effective recovery — that is the quickest way to rescue data when Windows permissions block access. If the goal is to restore Windows access instead of copying files, use Windows’ built‑in ownership and ACL tools: takeown to recover ownership and icacls to reset or regrant permissions. (learn.microsoft.com)

From an elevated (Administrator) Command Prompt you can try these steps (run one after the other):

takeown /f "D:\mouad" /r /d y

icacls "D:\mouad" /reset /T /C

# or, to explicitly grant the current user full control:
icacls "D:\mouad" /grant %USERNAME%:F /T /C

takeown makes an administrator the owner; icacls /reset restores default ACLs recursively. Use the grant form only if you need immediate full access. Both tools and their parameters are documented by Microsoft. (learn.microsoft.com)

If Windows refuses these operations because the OS itself blocks changes, run the commands from the Windows Recovery Environment (command prompt) or fall back to the live Linux approach used above to copy data off and then fix permissions offline. Microsoft community guidance and docs show icacls /reset is usable from an offline environment when the normal system prevents changes. (learn.microsoft.com)

Cautions: always back up before doing recursive /reset or ownership changes, and avoid running wide recursive fixes on system folders (they can break installed software or the OS). Copying the files first (Ubuntu method) is safest when the data is the priority, then repair permissions on a noncritical copy and move data back. (learn.microsoft.com)

Recommended Answers

All 4 Replies

Try downloading a linux livecd and booting off that. Copy the files to another folder/device then delete the bad folders.

nice idea i'll try it asap .
thank you

and it's working, i successfully moved the files to a new folder using ubuntu.
thank you so much Jim !

Problem solved .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.