karelb has asked for the wisdom of the Perl Monks concerning the following question:
I have a perl script that is basically a crawler that uses perl find to search for a type of file in a directory structure. That works fine as long as I have read access to the file.
However if it will of course not find a file that belongs to a group I am not a member of. So far so good.
Now I have a Linux account with about 40+ groups it belongs to. But for these filesystems an account can only read files for the first 15 groups. With the command newgrp or sg one can set a group from the 15+ range as the first group and read the file. However these commands spawn a subshell .
How can I set a group form a perl script before I do the find subroutine. Any ideas, cleu or hints most appreciated.
Thanks in advance
KArel
PS I have no control on the absurdity of having so many groups in one account.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problems with unix groups
by aaron_baugher (Curate) on Mar 21, 2012 at 10:41 UTC |