LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-07-2004, 05:58 AM   #1
mscomputers
LQ Newbie
 
Registered: Nov 2004
Posts: 5

Rep: Reputation: 0
client denied by server configuration


I have a cgi script which allows users to upload a file to "upload" directory. set permissions 777 etc. From within my internal network the script work perfect.

From outside my network (internet) the upload portion of the script won't work.
http errorlog - "client denied by server configuration: /var/www/errorHTTP_INTERNAL_SERVER_ERROR.html.var"

I have checked httpd.conf and commonhttpd.conf I have the directory configured

<Directory /home/user/httpd/graphics/upload>
Options MultiViews -Indexes IncludesNoExec FollowSymLinks
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>

</Directory>

Any help would be appriciated, thanks

Mandrake 10.0

Apache-AdvancedExtranetServer/2.0.48 (Mandrake Linux/5mdk) mod_perl/1.99_11 Perl/v5.8.3 mod_ssl/2.0.48 OpenSSL/0.9.7c PHP/4.3.4 Server

Last edited by mscomputers; 12-07-2004 at 10:47 AM.
 
Old 12-07-2004, 07:04 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
It is probably not that access to that directory is forbidden, but that running cgi scripts outside localhost might be forbidden. See the error-log of your apache as well as suexec.log.

Also, what does the script look like?
 
Old 12-07-2004, 07:49 AM   #3
mscomputers
LQ Newbie
 
Registered: Nov 2004
Posts: 5

Original Poster
Rep: Reputation: 0
I will just post this portion or the script. The apache errorlog only shows what I posted previously.





if ($match_found ne "on") {
unlink("$upload_file");
&upload_no_match_error;
exit;
}

if ($upload_file_filename =~ /.*\.gif/i) {
unlink("$temp_dir/$number.gif");
rename($upload_file, "$temp_dir/$number.gif");
&imagesize("$temp_dir/$number.gif");
if (($image_width == 0) && ($image_height == 0))
{
unlink("$temp_dir/$number.gif");
&upload_invalid_gif_error;
exit;
}
elsif (($image_width > $max_image_width) || ($image_height > $max_image_height))
{
unlink("$temp_dir/$number.gif");
&upload_invalid_size_error;
exit;
}
else
{
unlink("$upload_path/$number.gif");
unlink("$upload_path/$number.jpg");
rename("$temp_dir/$number.gif", "$upload_path/$number.gif");

if ($os eq "unix") { chmod 0666, "$upload_path/$number.gif"; }
}
}

elsif ($upload_file_filename =~ /.*\.jpg/i) {
unlink("$temp_dir/$number.jpg");
rename($upload_file, "$temp_dir/$number.jpg");
&imagesize("$temp_dir/$number.jpg");
if (($image_width == 0) && ($image_height == 0))
{
unlink("$temp_dir/$number.jpg");
&upload_invalid_jpg_error;
exit;
}
elsif (($image_width > $max_image_width) || ($image_height > $max_image_height))
{
unlink("$temp_dir/$number.jpg");
&upload_invalid_size_error;
exit;
}
else
{
unlink("$upload_path/$number.gif");
unlink("$upload_path/$number.jpg");
rename("$temp_dir/$number.jpg", "$upload_path/$number.jpg");

if ($os eq "unix") { chmod 0666, "$upload_path/$number.jpg"; }
}
}

else { unlink("$upload_file");
&upload_format_error;
exit;
}

&successful_upload_message;

}

I don't have the other logfile to look at (using webmin)

Last edited by mscomputers; 12-07-2004 at 07:57 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
WebDAV - 'client denied by server configuration' error jamesrh Linux - Software 2 03-11-2015 09:19 AM
XP Client Returns 'Access is Denied' Error When Trying to Connect to a Samba Server BuckRogers01 Linux - Networking 1 05-25-2005 11:55 AM
NFS Server thinks its exporting, client denied crosseyedalien Mandriva 2 05-17-2005 09:39 AM
Apache vhost issues (client denied by server configuration) bpk Linux - Software 8 02-16-2005 07:02 PM
Permission denied on client when running install script residing on NFS server dstotz Linux - Newbie 2 12-11-2004 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration