Re: cgi data file permission problem

2006-11-22 Thread Gabor Szabo

On 11/22/06, Aharon Schkolnik [EMAIL PROTECTED] wrote:

Hi.

I am trying to set up http://www.dynamicnetworks.us/netflow/10-cugrapher.html

There is a perl program which resides in /var/www/cgi-bin. So far, so good.

The program needs to open data files:

opendir( DIR, $rrddir ) or browserDie(open $rrddir failed ($!));

This generates the error:

open /var/www/data/netflow/rrds failed (Permission denied)



Does the user running Apache have right to open that file?

Gabor



As you can see, I have tried moving the data file under the /var/www/data
directory. I planned to replace this with a symlink.

I figured  the problem was in the httpd.conf file, so I added the following:

Directory /var/www/data

Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

/Directory


No, this nothing has to do with the above problem.



What else  do I need to do ?

I am running FC 5 with selinux.


FC4 had this strong file system management working above the
level of the simple UNIX file permissions.

Maybe this is the same problem here.

Gabor

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: cgi data file permission problem

2006-11-22 Thread Valery Reznic
You may need to set selinux attribute (with chcon) for
the file you are about to open.
If you are open file for writing you 
may want to use 'httpd_sys_script_rw_t' on both file
and it's parent directory, for reading -
httpd_sys_script_ro_t for file

Valery.
--- Aharon Schkolnik [EMAIL PROTECTED] wrote:

 Hi.
 
 I am trying to set up

http://www.dynamicnetworks.us/netflow/10-cugrapher.html
 
 There is a perl program which resides in
 /var/www/cgi-bin. So far, so good.
 
 The program needs to open data files:
 
 opendir( DIR, $rrddir ) or browserDie(open $rrddir
 failed ($!));
 
 This generates the error:
 
 open /var/www/data/netflow/rrds failed (Permission
 denied)
 
 
 As you can see, I have tried moving the data file
 under the /var/www/data 
 directory. I planned to replace this with a symlink.
 
 I figured  the problem was in the httpd.conf file,
 so I added the following:
 
 Directory /var/www/data
 
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
 
 /Directory
 
 
 What else  do I need to do ?
 
 I am running FC 5 with selinux.
 
 TIA,
 
 -- 
   The day is short, and the work is great,| 
 Aharon Schkolnik
   and the laborers are lazy, and the reward   |  
   is great, and the Master of the house is| 
 [EMAIL PROTECTED]
   impatient. - Ethics Of The Fathers Ch. 2| 
 050-8724844
 

=
 To unsubscribe, send mail to
 [EMAIL PROTECTED] with
 the word unsubscribe in the message body, e.g.,
 run the command
 echo unsubscribe | mail
 [EMAIL PROTECTED]
 
 



 

Sponsored Link

Rates near 39yr lows. $510,000 Loan for $1698/mo. 
Calcuate new payment. www.LowerMyBills.com/lre

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: cgi data file permission problem

2006-11-22 Thread Aharon Schkolnik
Thanks for the help.

It is in fact a selinux problem.

I may not pursue the issue any further,  because  I may be dropping the whole 
project for other reasons.



On Wednesday 22 November 2006 5:28 pm, Valery Reznic wrote:
 You may need to set selinux attribute (with chcon) for
 the file you are about to open.
 If you are open file for writing you
 may want to use 'httpd_sys_script_rw_t' on both file
 and it's parent directory, for reading -
 httpd_sys_script_ro_t for file

 Valery.

 --- Aharon Schkolnik [EMAIL PROTECTED] wrote:
  Hi.
 
  I am trying to set up

 http://www.dynamicnetworks.us/netflow/10-cugrapher.html

  There is a perl program which resides in
  /var/www/cgi-bin. So far, so good.
 
  The program needs to open data files:
 
  opendir( DIR, $rrddir ) or browserDie(open $rrddir
  failed ($!));
 
  This generates the error:
 
  open /var/www/data/netflow/rrds failed (Permission
  denied)
 
 
  As you can see, I have tried moving the data file
  under the /var/www/data
  directory. I planned to replace this with a symlink.
 
  I figured  the problem was in the httpd.conf file,
  so I added the following:
 
  Directory /var/www/data
 
  Options Indexes FollowSymLinks
  AllowOverride None
  Order allow,deny
  Allow from all
 
  /Directory
 
 
  What else  do I need to do ?
 
  I am running FC 5 with selinux.
 
  TIA,
 
  --
The day is short, and the work is great,|
  Aharon Schkolnik
and the laborers are lazy, and the reward   |
is great, and the Master of the house is|
  [EMAIL PROTECTED]
impatient. - Ethics Of The Fathers Ch. 2|
  050-8724844

 =

  To unsubscribe, send mail to
  [EMAIL PROTECTED] with
  the word unsubscribe in the message body, e.g.,
  run the command
  echo unsubscribe | mail
  [EMAIL PROTECTED]

 ___
_ Sponsored Link

 Rates near 39yr lows. $510,000 Loan for $1698/mo.
 Calcuate new payment. www.LowerMyBills.com/lre

 =
 To unsubscribe, send mail to [EMAIL PROTECTED] with
 the word unsubscribe in the message body, e.g., run the command
 echo unsubscribe | mail [EMAIL PROTECTED]

-- 
  The day is short, and the work is great,|  Aharon Schkolnik
  and the laborers are lazy, and the reward   |  
  is great, and the Master of the house is|  [EMAIL PROTECTED]
  impatient. - Ethics Of The Fathers Ch. 2|  050-8724844

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]