Filesys::POSIX::ReducedPrivileges - Portal to actual underlying filesystem as seen by a particular UID/GID.
use Filesys::POSIX; use Filesys::POSIX::Real; my $fs = Filesys::POSIX->new(Filesys::POSIX::ReducedPrivileges->new, 'path' => '/home/foo/test', 'noatime' => 1, 'uid' => 99, 'gid' => 99, );
This module wraps the Filesys::POSIX::Real filesystem type with entry and exit functions that switch the effective UID and GID whenever the filesystem is accessed.
The following values are mandatory:
The path, in the real filesystem, upon which the new filesystem to be mounted will be based.
The numeric UID to use when accessing the real filesystem.
The numeric GID to use when accessing the real filesystem. The suppelemental group list is also limited to this GID.
Written by John Lightsey <email@example.com>
Copyright (c) 2016, cPanel, Inc. Distributed under the terms of the Perl Artistic license.