0

I have the ability to create directories, but I have a problem where...

I cannot continue to access directories that might require a second or third operation after their initial creation; so, I want to create a script with admin access that can change the owner and set the correct permissions every time a directory is added.

How do I create a scriptfile and give it sufficient permissions to change the permissions and owners of other files? And how do I then set up a watch on my directory and all of its recursive children such that any time a new directory is created, its permissions and ownership are set to the desired state?

Also, for the sake of learning, if you have a better way to achieve the result, please tell me how to achieve the result in the method described above? I'm very interested to know how to monitor a folder and its children and trigger a script.

Wolfpack'08
  • 3,982
  • 11
  • 46
  • 78

0 Answers0