|
|
Question : chmod -R - how to give group the same permissions as owner has for all sibdirs/files
|
|
Hello, I (let's say username=UserMe, Group=MyGroup) installed SW package to the directory MyPackage. I own this directory (and all the files below as they were installed under my username).
Now I want that other Users from my group access this directory (and sub dirs/files) with the same privileges for read,write,execute as me.
I.e. I want to "copy" the set of permissions of each file/dir to the group.
i.e. if now "rw-r--r-- myfile" I want to have "rw-rw-r-- myfile"
Is this possible and how ? Can I do it or I need to ask root administrator ? (I guess I can do it as he ower of this dir?)
Thanks
|
Answer : chmod -R - how to give group the same permissions as owner has for all sibdirs/files
|
|
find . -perm +00400 | xargs chmod g+w etc etc ( 6 times all the ~ same...) will be quicker... ( each one chmod will get as many files as fits in argument )
basically I suggest two solutions to your problem ( chown and chgrp will be used besides chmod)
Solution 1: ( recommended if your program is suid already) Make program sgid , and all users that need to run it in that group . Solution 2: ( recommended if you need only the program to access datafiles) Make program u+s o-a and all data files will be owned by that user and accessed via ultimate program
|
|
|
|