LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux > 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
 
Thread Tools
Old 12-07-2004, 06:58 AM   #1
mscomputers
LQ Newbie
 
Registered: Nov 2004
Posts: 5
Thanked: 0
client denied by server configuration


[Log in to get rid of this advertisement]
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 11:47 AM..
mscomputers is offline     Reply With Quote
Old 12-07-2004, 08:04 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Helsinki, Finland
Distribution: Debian/unstable
Posts: 1,354
Thanked: 0
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?
ToniT is offline     Reply With Quote
Old 12-07-2004, 08:49 AM   #3
mscomputers
LQ Newbie
 
Registered: Nov 2004
Posts: 5
Thanked: 0

Original Poster
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 08:57 AM..
mscomputers is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
XP Client Returns 'Access is Denied' Error When Trying to Connect to a Samba Server BuckRogers01 Linux - Networking 1 05-25-2005 12:55 PM
NFS Server thinks its exporting, client denied crosseyedalien Mandriva 2 05-17-2005 10:39 AM
Apache vhost issues (client denied by server configuration) bpk Linux - Software 8 02-16-2005 08:02 PM
Permission denied on client when running install script residing on NFS server dstotz Linux - Newbie 2 12-11-2004 03:10 PM
WebDAV - 'client denied by server configuration' error jamesrh Linux - Software 1 10-29-2003 01:08 PM


All times are GMT -5. The time now is 03:35 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration