Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Opening files to write in browser returns Permission denied

by huck (Parson)
on May 03, 2017 at 01:23 UTC ( #1189379=note: print w/replies, xml ) Need Help??


in reply to Re^2: Opening files to write in browser returns Permission denied
in thread Opening files to write in browser returns Permission denied

How do you open sitemap.pl in your browser?

You may find it of interest to run this

my $user = `whoami`; chomp $user; my $groups = `groups $user`; chomp $groups; print "<br>I am running as $user in groups $groups\n";
I suspect that the user you get back is not what you expected. I also suspect it is the last 6 in 666 that is fixing your problem. You are setting up a file that anyone can write into. Knowing what groups you are in and the perl process is running you may be able to determine what groups you may have in common. Setting that file (or directory) to be a member of that common group may mean you dont need to let anyone write to that file, but limit it to only userids in that common group.

Replies are listed 'Best First'.
Re^4: Opening files to write in browser returns Permission denied
by Lady_Aleena (Curate) on May 05, 2017 at 07:26 UTC

    I did as you specified and was surprised by the result. I will have to dig into apache2 to see how can make my "localhost" local to me. Thank you huck!

    No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
    Lady Aleena

      For server-wide apache process ownership see User and Group.

      For per-vhost user/group assignments see SuexecUserGroup and the suexec tutorial.

      Make sure you fully understand the implications of using these directives before invoking them on any publicly-accessible server.

Re^4: Opening files to write in browser returns Permission denied
by Anonymous Monk on May 03, 2017 at 16:33 UTC
    Whether it is the first, the second, or the third... That seems to work.

    P.S. Would it be better to set the file permissions to 777? Why does evil win here?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1189379]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2019-05-20 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (129 votes). Check out past polls.

    Notices?