[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20021028: How to display Mcidas images in website



>From: Sridharareddy Duggireddy <address@hidden>
>Organization: USF
>Keywords: 200210162107.g9GL7S107707 McIDAS FRMSAVE

Sridhara,

you wrote to Jim Koermer:

>I have tried to implement your scripts.I have written gen_mcidas_sat and
>gen_mcidas_sat.cgi in cgi-bin directory which is owned by root.i have
>written mk_mcsat in /home/sduggir directory which is owned by me and which
>has mcidas installed.

I wonder about the comment "/home/sduggir directory which ... has mcidas
installed".  What do you mean by this?  McIDAS is designed to be installed
in the 'mcidas' account.  Other users then access the McIDAS executables
and data and ancillary data files owned by 'mcidas'.  Each user of McIDAS
will have a McIDAS working directory in which a number of files will
get created/modified.

Do you really mean that you installed McIDAS in your account?  Or, do
you mean that the home directory for the user 'mcidas' is /home/sduggin?
Or -- hopefully --, do you mean that you access McIDAS from your account?

>I have created a directory named gifs owned by me to
>store gif images in /usr/local/apps/php-apache/htdocs/sridhara/gifs.
>/usr/local/apps/php-apache/htdocs/sridhara is owned by root.

This setup is starting to sound very complicated.

>When i was trying to run these scripts i am getting
>the following errors. It was executing upto mcenv in mcidas_gen_sat and
>after that i am getting
>
>   open:No such file or directory
>  apparent state:unit 10 named /tmp/mctmp/1189871693/MCRGB.TXT
>  LATELY WRITING direct unformatted external IO
>  mcenv could not exec /home/sduggir/mk_mcsat:permission denied
>  1:permission denied
>can you please tell me why it is occuring and what should i do?

This tells me that the McIDAS environment you setup in your mcidas_gen_sat
script is causing a McIDAS routine to try and use a file that you do
not own.

A number of questions come to my mind.  First, you have a number of
things (directories and presumably files) owned by 'root'.  Is your
web server running as 'root'?  If so, this is _bad_ and non-standard.
What you should be aiming to do is have scripts run as the user that
is running your web server.  Have this done so that this user has
a mcidas/data directory in their account.  Make sure that this directory
is owned by this user (not root), so that it can write things there.
Then set the MCDATA environment variable in your scripts to this
directory, and the MCPATH environment variable to have this directory
as the first directory.  The additional MCPATH directories would be
the data and help subdirectories of where McIDAS is installed.  The
standard place for McIDAS to be installed is /home/mcidas, so the
second two MCPATH directories would be /home/mcidas/data and
/home/mcidas/help.  So, if your web server is being run as the user
'www' (the user the web server runs as is a configurable parameter
and dependant on which web server you are running), then your MCDATA
and MCPATH would look something like:

MCDATA=/home/www/mcidas/data
MCPATH=/home/www/mcidas/data:/home/mcidas/data:/home/mcidas/help

McIDAS invocations run as 'www' will want to create subdirectories
of ~www/.mctmp.  This means that ~www must be writable by user 'www'.

(Again, adjust the user name form 'www' in the above to the user
your web server is running as.)

Would it be possible for me to get a login to the system you are working
on to see exactly how things are setup?  I think that there are several
things you are doing that are making things more complicated than they
need to be.

Tom

>From address@hidden Mon Oct 28 15:21:30 2002
>To: Unidata Support <address@hidden>
>Subject: Re: 20021028: How to display Mcidas images in website

Tom,

I e-mailed Sridhara today about his problem. It definitely has to do
with his McIdas setup, ownership, and permissions. I told him to set up
a separate directory set up to run mcidas and owned by user, "nobody"
which is the default user from web access. It sounded like he had things
set up in his own directory. I'm not sure that he is not the user, when
he tries to access the stuff over the web. Hopefully, I straightened him
out.

Jim
--
James P. Koermer             E-Mail: address@hidden
Professor of Meteorology     Office Phone: (603)535-2574
Natural Science Department   Office Fax: (603)535-2723
Plymouth State College       WWW: http://vortex.plymouth.edu/
Plymouth, NH 03264