I have a folder in which new subfolders and files will be created automatically, by a script.
I want to maintain the user and group permissions recursively for all new folders and files placed in the parent directory. I know this involves setting a sticky bit, but I can't seem to find a command that shows exactly what I need.
This is what I have done so far:
sudo mkdir -p /path/to/parent
sudo chmod -R 660 myself:somegroup /path/to/parent
Thereafter, I want the 660 permissions to be set recursively to any folders and files placed in /path/to/parent
However, everything I have tried so far has failed - i.e. . Can someone help please?
Actually the octal flag 660 is probably not even correct. The permissions I want are:
- Directories placed under /path/to/parent are eXecutable by users with permissions
- files are read/writeable by user myself and members of somegroup
- Files and folders in /path/to/parent is NOT world readable
Can someone help please?
I am running on Ubuntu 10.0.4 LTS