S
S
shasoft2020-01-21 07:34:57
NTFS
shasoft, 2020-01-21 07:34:57

What to write in a batch file so that it sets the rights to the "Full access for everyone" folder?

There is a flash drive with NTFS. From time to time it happens that I create a file on one machine on it that is not available on another machine. What needs to be written in the bat file so that at startup it
1. Sets the rights to "Full access for all"
2. Sets that the rights are inherited for all child objects
?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AUser0, 2020-01-21
@shasoft

In Windows 7 (and newer) on all files/directories in the startup directory:
- removes already set permissions,
- adds full access for the "Everyone"/"Everyone" user (that is, for any system user),
- enables inheritance of rights from the parent directories.

@echo off
icacls * /T /C /Q /grant:r *S-1-1-0:(OI)F

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question