Unable to use "_PC_CHOWN_RESTRICTED" in Perl on RHEL 8

Solution Unverified - Updated -

Issue

  • Unable to use _PC_CHOWN_RESTRICTED in Perl on RHEL 8
  • Checking for POSIX-compatible file permissions like chown does not work on RHEL 8, but used to work on RHEL 7:
rhel7 $ perl -e 'use POSIX; print POSIX::sysconf(&POSIX::_PC_CHOWN_RESTRICTED), "\n";'
6
rhel8 $ perl -e 'use POSIX; print POSIX::sysconf(&POSIX::_PC_CHOWN_RESTRICTED), "\n";'
(empty newline)

Environment

  • Red Hat Enterprise Linux 8
  • perl-5.26.3-422.el8
  • Perl POSIX module

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content