When creating a directory tree in one shot like below, the directories dir1 and dir2 are getting the default owner/permissions(chmod) and only the end directory(ie; dir3) is created with the required owner/permission. I could not figure out from man pages or searches how to set the same permission for all the directories in the tree.
What option can get me all the directories created with same owner/permission?
Example:
#install -d --mode=777 --group=myuser --owner=myuser dir1/dir2/dir3
#ll
total 4
**drwxr-xr-x** 3 **root root** 4096 Jul 10 18:21 dir1
#ll dir1/
total 4
**drwxr-xr-x** 3 **root root** 4096 Jul 10 18:21 dir2
#ll dir1/dir2/
total 4
**drwxrwxrwx** 2 **myuser myuser** 4096 Jul 10 18:21 dir3