4

Is it possible (if so, how?) to deny execution permission for a single file, for a user (or group), but keep read and write permissions?

When I deny "Read & Execute" in the interface, "Read" is also denied.

I am specifically asking about files, not directories.

Home premium, SP 1

3 Answers 3

3

Go to the Advanced interface (select Advanced rather than Edit on the Security tab) and you can set the individual access rights.

Or, from a command line:

icacls file.exe /deny Everyone:(X)
1

For the record, in the GUI you have to use the "Advanced" button and then enter the appropriated denial. It will show only as "special" permission in the non-advanced summary page.

enter image description here

Hopefully they've made this less confusing in Win10, but I can't check this very moment.

I've double-checked that one can still read the file (e.g. from text or hex editor) after that.

-3

Windows file permissions don't allow for a case wherein the user may read and write but not execute a given file.

Referring to the table here, you can see that no file permission simultaneously grants read/write access while denying execute access.

2
  • I'm not sure what that table is supposed to mean - it appears to relate the basic permission set to the advanced permission set - but you can certainly configure permissions that allow a file to be read but not executed. Jan 31, 2013 at 20:59
  • 1
    Sure you can. Even form the GUI, you just have to use the "Advanced" button in Win7. Harry Johnston's answer is correct. May 27, 2022 at 14:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .