setting chmod 700 with Windows 7 permission

6

3

Its hard to explain but basically I have a folder on a partition which I made myself the owner of. Basically I want (in Linux/chmod terms) 700 permission on it.

Problem is: 1) I don't know how to set permission for everyone else (is it systemname\users?) 2) everyone seems to have read access to the files automatically with the checkboxes grayed out 3) I cannot set the read to deny because setting it for everyone includes me and then I cant access the files.

So how do I set the permission so only I the owner can access these files?

user3109

Posted 2010-03-05T06:33:19.627

Reputation:

Answers

3

Open up the properties on the folder.

Select security tab | advanced | change permissions

Untick "include inheritable permissions" and select remove on the pop-up. Do NOT save (it will remove all permissions). Tick "replace all child object permissions..." so the contents of the folder will also be updated.

Select Add, enter your username and click Check Names, if you have entered your usename correctly it will be underlined (you might need to include a domain name). You can use Advanced to search.

Select the permissions you want (presumably "Full Control" which will tick all the other boxes), ensure apply to has "This folder, subfolders and files" is select (and that "apply these permissions to objects and/or containers within this container only" is NOT ticked).

Click OK to go back to the Advanced Security settings (which should have one entry now), click OK (which will change the permissions) and OK all the way out.

You are the only user with any access to the folder and files.


NB. Unlike *nix there is no "execute" permission in Windows, if you can read the file, you can (try and) execute it.

Richard

Posted 2010-03-05T06:33:19.627

Reputation: 8 152

perfect! (7 more to go..) – None – 2010-03-05T18:20:14.637

Surprisingly, this is not enough for GnuPG as it complains about permissions. Also if you happen to have msys2 installed, ls still reports r&x for group and others even if you are the owner and the only used with read & write permissions.

– mlt – 2015-10-29T20:19:01.680

2Actually, NTFS does have an execute permission; It's just called "Read & Execute" instead of just "Execute". – Hello71 – 2010-07-13T00:49:24.300

1@Hello71 - You can actually get more granular than that. If you go into the advanced section of the ACEs, you can give Traverse Directory/Execute file independent of read, though the circumstance for needing this is pretty rare. – MDMarra – 2010-07-13T01:51:41.340

0

icacls foo.dat /grant:r *S-1-3-0:(F) /inheritance:r

where foo.dat is the name of the file. The :r after /grant means to replace the existing permissions, the :r after /inheritance means to remove inherited permissions. (F) is for full control, and S-1-3-0 is the SID for "Creator/Owner" (necessary thanks to the insane localization policy).

RolKau

Posted 2010-03-05T06:33:19.627

Reputation: 826