The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Filesys::POSIX::ReducedPrivileges - Portal to actual underlying filesystem as seen by a particular UID/GID.

SYNOPSIS

    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,
    );

DESCRIPTION

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.

MOUNT OPTIONS

The following values are mandatory:

path

The path, in the real filesystem, upon which the new filesystem to be mounted will be based.

uid

The numeric UID to use when accessing the real filesystem.

gid

The numeric GID to use when accessing the real filesystem. The suppelemental group list is also limited to this GID.

AUTHOR

Written by John Lightsey <jd@cpanel.net>

COPYRIGHT

Copyright (c) 2016, cPanel, Inc. Distributed under the terms of the Perl Artistic license.