On 9/18/06, Ken Foskey <[EMAIL PROTECTED]> wrote:
I have a lot of files created by a (much too) complex script and the user I am running with has a default group of 'staff' but I want all files created to have <client>grp which we create to ensure that only authorised people have access to a particular clients data. I have a command in Linux that does this but I am running on AIX (I want it portable so a pure perl method is better...) MY solutions are chgrp on the file after creation. Great initially but then someone will forget for a new file and besides it adds a lot more code and the complexity goes up. I ended up adding the group to the directory with g+s to force the group but there may be a time were we use common directories and the file should be protect there as well. I cannot google an answer because there are too many answers and I cannot figure out how to fine tune my query. I want to change the group files are created with and I cannot google an answer because I get too many answers. Thanks Ken Foskey I'm not sure I understand. It appears you don't want to ( or can't) change the default group of your id so they are created with this group? You don't want to use chown -R or chgrp -R on directories after the fact? What about in the program before it finishes?
How exactly do you identify this is a file that should have this special group? When the file is initiallly created I'm guessing you shouild set correct ownership then. If you are trying to do it after the fact then you will need to find something unique about these files to search on then issue the correct ownsership. I think I'm missing a piece of this question. And why does your "command in Linux" not work in AIX? Are you running current AIX?