-
Notifications
You must be signed in to change notification settings - Fork 584
perldoc does not generate doc properly if run as root and file is not world readable #17701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
For several reasons, I don't think this is a valid bug report for the Perl 5 core distribution.
https://metacpan.org/release/Pod-Perldoc -> https://rt.cpan.org/Dist/Display.html?Name=Pod-Perldoc https://metacpan.org/pod/Pod::Usage -> https://metacpan.org/pod/Pod::Usage
Thank you very much. |
Thank you for your comment. As I can understand the first two points, why do you say that root can't run 'protected_script --man' to see the documentation? As I understand, Pod::Man is used to generate nroff formatted man pages. I use Pod::Usage in my script to generate usage information and man page as suggested in Pod::Usage documentation along with Getop::Long: |
The upstream maintainers of the Pod-Perldoc and Pod-Usage distribution are better equipped to respond to these questions than I am. I'm closing this ticket and urging you to open tickets in those upstream bug trackers (as I recommended in point #1 back in 2020). |
If I have a file (in fact a script that uses Pod::Usage to generate man page) that can be read only by root (mode is 0700), perldoc can't generate documentation:
perldoc bar.pod Error while formatting with Pod::Perldoc::ToTerm: Can't open bar.pod: Permission denied at /usr/share/perl/5.26/Pod/Perldoc/ToTerm.pm line 113.
I get a similar result if directory is readable only by root.
If run by root, privileges are dropped and the file or directory cannot be accessed.
The text was updated successfully, but these errors were encountered: