Can't run cgi scripts on mounted fat partition

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't run cgi scripts on mounted fat partition

Peter Sykora
Hello,
I run Apache/2.0.53 under SUSE Linux 9.3 having the following problem:

When I try to make a script alias to a directory on a mounted fat
partition I always get the following error:
[Tue Apr 26 09:21:01 2005] [error] [client 127.0.0.1] (13)Keine
Berechtigung: exec of '/windows/D/home/html/canyon_new2/cgi/env.pl' failed

(Keine Berechtigung ~ permission denied)

Using the same script on my linux home cgi-directory where apache is
installed, everything works fine.

Here are the related parts of my config file:

# Setting the document root to a directory on the fat partition (which
works fine)
DocumentRoot /windows/D/home/html

# The script alias and directory settings of my home cgi-directory,
which works fine as well
ScriptAlias /cgi-bin/ "/home/psykora/cgi-bin/"
<Directory "/home/psykora/cgi-bin/">
 Options None AllowOverride None
 Order allow,deny
 Allow from all
</Directory>

# The script alias and directory settings of the cgi directory on the
fat partition which doesn't work
ScriptAlias /cgi-canyon/ "/windows/D/home/html/canyon_new2/cgi/"
<Directory "/windows/D/home/html/canyon_new2/cgi/">
 Options None AllowOverride None
 Order allow,deny
 Allow from all
</Directory>

I also tried some other directory options like:
- AddHandler cgi-script .cgi .pl
- Options +ExecCGI

The fstab entry of my fat partition is:
/dev/hda5            /windows/D           vfat      
users,gid=users,umask=0000      0 0

and I have also checked the permissions of /windows/D which are
drwxrwxrwx  17 root users 32768 1970-01-01 01:00 D
So all files and directories on this partition should be executable as well.

I can't see a reason why apache replies with a permission denied. Does
anybody have an idea.
Thanks for any hints
Peter

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [hidden email]
   "   from the digest: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Can't run cgi scripts on mounted fat partition

Boyle Owen
> -----Original Message-----
> From: Peter Sykora [mailto:[hidden email]]
> Sent: Dienstag, 26. April 2005 10:23
> To: [hidden email]
> Subject: [users@httpd] Can't run cgi scripts on mounted fat partition
>
>
> Hello,
> I run Apache/2.0.53 under SUSE Linux 9.3 having the following problem:
>
> When I try to make a script alias to a directory on a mounted fat
> partition I always get the following error:
> [Tue Apr 26 09:21:01 2005] [error] [client 127.0.0.1] (13)Keine
> Berechtigung: exec of
> '/windows/D/home/html/canyon_new2/cgi/env.pl' failed

Can you execute the path above at the command line?

Does the script try to write anything to the windows partition?

I seem to recall that linux cannot write to certain windows file-system types. I thought it was NTFS... but maybe it is VFAT as well... Check on a linux forum.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.

>
> (Keine Berechtigung ~ permission denied)
>
> Using the same script on my linux home cgi-directory where apache is
> installed, everything works fine.
>
> Here are the related parts of my config file:
>
> # Setting the document root to a directory on the fat
> partition (which
> works fine)
> DocumentRoot /windows/D/home/html
>
> # The script alias and directory settings of my home cgi-directory,
> which works fine as well
> ScriptAlias /cgi-bin/ "/home/psykora/cgi-bin/"
> <Directory "/home/psykora/cgi-bin/">
>  Options None AllowOverride None
>  Order allow,deny
>  Allow from all
> </Directory>
>
> # The script alias and directory settings of the cgi directory on the
> fat partition which doesn't work
> ScriptAlias /cgi-canyon/ "/windows/D/home/html/canyon_new2/cgi/"
> <Directory "/windows/D/home/html/canyon_new2/cgi/">
>  Options None AllowOverride None
>  Order allow,deny
>  Allow from all
> </Directory>
>
> I also tried some other directory options like:
> - AddHandler cgi-script .cgi .pl
> - Options +ExecCGI
>
> The fstab entry of my fat partition is:
> /dev/hda5            /windows/D           vfat      
> users,gid=users,umask=0000      0 0
>
> and I have also checked the permissions of /windows/D which are
> drwxrwxrwx  17 root users 32768 1970-01-01 01:00 D
> So all files and directories on this partition should be
> executable as well.
>
> I can't see a reason why apache replies with a permission
> denied. Does
> anybody have an idea.
> Thanks for any hints
> Peter
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [hidden email]
>    "   from the digest: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Diese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a private and personal nature. It is not related to the exchange or business activities of the SWX Group. Le présent e-mail est un message privé et personnel, sans rapport avec l'activité boursière du Groupe SWX.
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [hidden email]
   "   from the digest: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can't run cgi scripts on mounted fat partition

Peter Sykora
Hi Owen,
thanks for your quick reply

>Can you execute the path above at the command line?
>  
>
Yes I can. I also tried it under the user wwwrun.

>Does the script try to write anything to the windows partition
>  
>
No it is just a testscript that writes the environment variable settings
directly to the browser.

>I seem to recall that linux cannot write to certain windows file-system types. I thought it was NTFS... but maybe it is VFAT as well... Check on a linux forum.
>  
>
I checked that already. Linux is not able to write to NTFS but with VFAT
it's no problem.
The reason why I try to do the whole thing is because I want to access
my files from Windows and Linux on the same location ...

Peter

>>(Keine Berechtigung ~ permission denied)
>>
>>Using the same script on my linux home cgi-directory where apache is
>>installed, everything works fine.
>>
>>Here are the related parts of my config file:
>>
>># Setting the document root to a directory on the fat
>>partition (which
>>works fine)
>>DocumentRoot /windows/D/home/html
>>
>># The script alias and directory settings of my home cgi-directory,
>>which works fine as well
>>ScriptAlias /cgi-bin/ "/home/psykora/cgi-bin/"
>><Directory "/home/psykora/cgi-bin/">
>> Options None AllowOverride None
>> Order allow,deny
>> Allow from all
>></Directory>
>>
>># The script alias and directory settings of the cgi directory on the
>>fat partition which doesn't work
>>ScriptAlias /cgi-canyon/ "/windows/D/home/html/canyon_new2/cgi/"
>><Directory "/windows/D/home/html/canyon_new2/cgi/">
>> Options None AllowOverride None
>> Order allow,deny
>> Allow from all
>></Directory>
>>
>>I also tried some other directory options like:
>>- AddHandler cgi-script .cgi .pl
>>- Options +ExecCGI
>>
>>The fstab entry of my fat partition is:
>>/dev/hda5            /windows/D           vfat      
>>users,gid=users,umask=0000      0 0
>>
>>and I have also checked the permissions of /windows/D which are
>>drwxrwxrwx  17 root users 32768 1970-01-01 01:00 D
>>So all files and directories on this partition should be
>>executable as well.
>>
>>I can't see a reason why apache replies with a permission
>>denied. Does
>>anybody have an idea.
>>Thanks for any hints
>>Peter
>>
>>---------------------------------------------------------------------
>>The official User-To-User support forum of the Apache HTTP
>>Server Project.
>>See <URL:http://httpd.apache.org/userslist.html> for more info.
>>To unsubscribe, e-mail: [hidden email]
>>   "   from the digest: [hidden email]
>>For additional commands, e-mail: [hidden email]
>>
>>
>>    
>>
>Diese E-mail ist eine private und pers?nliche Kommunikation. Sie hat keinen Bezug zur B?rsen- bzw. Gesch?ftst?tigkeit der SWX Gruppe. This e-mail is of a private and personal nature. It is not related to the exchange or business activities of the SWX Group. Le pr?sent e-mail est un message priv? et personnel, sans rapport avec l'activit? boursi?re du Groupe SWX.
>
>
>This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: [hidden email]
>   "   from the digest: [hidden email]
>For additional commands, e-mail: [hidden email]
>
>  
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [hidden email]
   "   from the digest: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can't run cgi scripts on mounted fat partition

Joost de Heer
In reply to this post by Peter Sykora
Peter Sykora said:
> Hello,
> I run Apache/2.0.53 under SUSE Linux 9.3 having the following problem:
>
> When I try to make a script alias to a directory on a mounted fat
> partition I always get the following error:
> [Tue Apr 26 09:21:01 2005] [error] [client 127.0.0.1] (13)Keine
> Berechtigung: exec of '/windows/D/home/html/canyon_new2/cgi/env.pl' failed
>
> (Keine Berechtigung ~ permission denied)

How did you mount the fat partition? You may have to add the
uid=xxx,gid=yyy,umask=zzz options to get everything setup correctly.

You could try to add as first line #!/path/to/perl to the script (but do
remember to save it as unix-style textfile when you save under windows
though, or a ^M added at the end will mess up things)

Joost


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [hidden email]
   "   from the digest: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Can't run cgi scripts on mounted fat partition

Peter Sykora
Joost de Heer schrieb:

>Peter Sykora said:
>  
>
>>Hello,
>>I run Apache/2.0.53 under SUSE Linux 9.3 having the following problem:
>>
>>When I try to make a script alias to a directory on a mounted fat
>>partition I always get the following error:
>>[Tue Apr 26 09:21:01 2005] [error] [client 127.0.0.1] (13)Keine
>>Berechtigung: exec of '/windows/D/home/html/canyon_new2/cgi/env.pl' failed
>>
>>(Keine Berechtigung ~ permission denied)
>>    
>>
>
>How did you mount the fat partition? You may have to add the
>uid=xxx,gid=yyy,umask=zzz options to get everything setup correctly.
>  
>
Hi Joost,
here is again my fstab entry:

/dev/hda5            /windows/D           vfat       users,gid=users,umask=0000      0 0

and I have also checked the permissions of /windows/D after the mount which are
drwxrwxrwx  17 root users 32768 1970-01-01 01:00 D
So all files and directories on this partition should be executable as well.

>You could try to add as first line #!/path/to/perl to the script (but do
>remember to save it as unix-style textfile when you save under windows
>though, or a ^M added at the end will mess up things)
>  
>
That's what I did as well. I even copied the working example from my
linux cgi-directory to the windows one, just to be sure. When I log on
as wwwrun and run the script on the fat partition from the commandline
everything works fine.

Peter

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [hidden email]
   "   from the digest: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Can't run cgi scripts on mounted fat partition

Joshua Slive
On 4/26/05, Peter Sykora <[hidden email]> wrote:
> >You could try to add as first line #!/path/to/perl to the script (but do
> >remember to save it as unix-style textfile when you save under windows
> >though, or a ^M added at the end will mess up things)
> >
> >
> That's what I did as well. I even copied the working example from my
> linux cgi-directory to the windows one, just to be sure. When I log on
> as wwwrun and run the script on the fat partition from the commandline
> everything works fine.

Exactly how do you run it?  Do you know that
perl script.pl
and
./script.pl
are very different.  Apache does something much closer to the latter.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [hidden email]
   "   from the digest: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Can't run cgi scripts on mounted fat partition

Peter Sykora

> > That's what I did as well. I even copied the working example from my
> > linux cgi-directory to the windows one, just to be sure. When I log on
> > as wwwrun and run the script on the fat partition from the commandline
> > everything works fine.
>
> Exactly how do you run it?  Do you know that
> perl script.pl
> and
> ./script.pl
> are very different.  Apache does something much closer to the latter.

Thanks Joshua!
I didn't take that into account.
I found out that I have to add the "exec" option in my fstab, and now it
works. Here is my fstab entry:

/dev/hda5  /windows/D  vfat  users,gid=users,umask=0000,rw,exec  0 0

But I still don't understand why I could see the execute rights for all
files and folders although this was wrong. Anyway I'm glad to have it
working now.

Thanks a lot for all your contributions
Peter

--
____________________________________________________

Sykora Peter
Institute of Cartography
ETH Hoenggerberg
CH-8093 Zurich
Tel: +41-1-6333028
mailto:[hidden email]
http://www.carto.net/ps 
http://www.carto.net/ps/canyon
http://www.statlas.org/
____________________________________________________

+++ Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [hidden email]
   "   from the digest: [hidden email]
For additional commands, e-mail: [hidden email]