Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hi, I'm using Centos 7 and I had been to execute mkdir in perl from web, but it's not executed, the /etc/profile has:
if [ $UID -gt 199 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; +then umask 002 else umask 022 fi

1er. condition:


2do. Condición:


The condition is false, so umask=022

File permissions for upload files: first I created a directory using mkdir from perl but it's not create:

my @archivos = $cgi->param("archivos"); my $inst = $cgi->param("inst"); my $fecha = $cgi->param("date1"); my $anio=substr($fecha,2,2); my $mes=substr($fecha,5,2); my $dia=substr($fecha,8,2); my @nombre_archivos = ("NI","RP","RDZ","CRF"); my $upload_dir = "/var/www/html/public_html/rev/$inst/$anio-$mes-$dia" +; mkdir $upload_dir, 0775;


Please will you help me? The permissons that I had been set are:

#/var/www/html drwxr-xr-x. 5 apache apache 4096 Dec 20 15:00 public_html

The error web messages is:

Software error: No such file or directory at /var/www/cgi-bin/programs/upload_modif_ok +.cgi line 49.

Line 49 is:

open ( UPLOADFILE, ">$upload_dir/$anio-$mes-$dia-$nombre_archivos[$ind +]" ) or die "$!";
For help, please send mail to the webmaster (root@localhost), giving t +his error message and the time and date of the error.

The /varlog/http/error has:

[Tue Jan 08 09:43:34.876310 2019] [cgi:error] [pid 31695] [client...] +AH01215: [Tue Jan 8 09:43:34 2019] upload_modif_ok.cgi: No such file + or directory at /var/www/cgi-bin/programs/upload_modif_ok.cgi line 4 +9., referer: http://...

Thanks a lot.

Regards. Seafree

In reply to mkdir permission by seafree

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-12-10 01:54 GMT
Find Nodes?
    Voting Booth?

    No recent polls found