How to grant previously denied RD rights on a folder?

I have denied RD (read data/list directory) on a folder:

> icacls mydir /deny "%userdomain%\%username%":(NP)(RD)

It is not possible anymore to list the content of that directory:

> dir /b mydir
File not found

Now, I would like to grant the RD rights back:

> icacls mydir /grant "%userdomain%\%username%":(NP)(RD)
processed file: mydir
Successfully processed 1 files; Failed processing 0 files

The command seems to work as expected. However, I still can't read the content of the directory:

> dir /b mydir
File not found

Worse, it seems that I can't do anything anymore on that directory (add files, read existing files when I know the name of the file, delete the directory...).

How can I get my rights back?


Solution 1:

The problem was solved with the command:

icacls mydir /t /q /c /reset