Search code examples
windowsfolder-permissions

How can I prevent a new folder inherit parent folder permissions by default?


I am creating a folder through Java code. The newly created folder automatically inherits the parent folders permissions. What setting should I change for my parent directory so that the child directories dont inherit permissions by default?


Solution

  • I figured out that while setting permission for the parent folder, you have an option 'This folder only'. This will prevent the permissions getting inherited to the child folders.