LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-18-2013, 09:05 AM   #1
yoda987
LQ Newbie
 
Registered: Mar 2011
Location: NC
Distribution: CentOS
Posts: 19

Rep: Reputation: 0
web file server download gets 403


Setup a simple web based file server. I put in a test page and can get to it successfully. Threw in a folder directory which is visible, and put the file I want to be able to download from the web. Cant DL the file though, due to a 403 error.

Pretty sure permissions are set right (same as the test file and directory).

/var/www/html/files

All my permissions after www are -rwxr-xr-x

Apache/2.2.15
 
Old 08-18-2013, 09:35 AM   #2
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,204
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
I'd start by looking in the error logs. A 403 means "forbidden", that means that either the folder/file is not world readable, in that case try

Quote:
chmod -R 777 /var/www/html
Of course, 777 is dangerous, you may need to tweak that down a bit by recalculating what you need...

Also, is Aopache allowed to read the folder? What file are you trying to download? Is that file even allowed to be downloaded? Check the .htaccess file too. Is it an FTP action or is the file part of the HTTP process? Maybe you'll need to install/config an FTP server too...

Thor
 
Old 08-18-2013, 11:47 AM   #3
itlb
LQ Newbie
 
Registered: Aug 2013
Distribution: Debian
Posts: 29

Rep: Reputation: Disabled
web file server download gets 403

Is the directory owner and group the same as the original file? is SELinux enabled?
 
Old 08-18-2013, 07:02 PM   #4
yoda987
LQ Newbie
 
Registered: Mar 2011
Location: NC
Distribution: CentOS
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Thor_2.0 View Post
I'd start by looking in the error logs. A 403 means "forbidden", that means that either the folder/file is not world readable, in that case try



Of course, 777 is dangerous, you may need to tweak that down a bit by recalculating what you need...

Also, is Aopache allowed to read the folder? What file are you trying to download? Is that file even allowed to be downloaded? Check the .htaccess file too. Is it an FTP action or is the file part of the HTTP process? Maybe you'll need to install/config an FTP server too...

Thor
555 should be all thats needed for web. You normally never want write, and read and execute are standard here. Apache is allowed, hense the it can list the directory, just not access the file.

Shouldnt need FTP for http access, totally different protocals. Lookup Wget

No htaccess file but itlb I think got close as well, its not SELinux, its iptables

Lets go poke at it...
 
Old 08-19-2013, 12:36 AM   #5
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 516

Rep: Reputation: 58
ok so i would prefer having a look on permissions on /var/www/html/files

2. share us the apache access logs.
SELINUX has nothing to do with 403 here.
 
  


Reply

Tags
fileserver, permission, web


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
WEB download - upload - server dlugasx Linux - Server 1 11-12-2010 06:38 AM
Download from a web server using HTTP njb Slackware 3 09-09-2010 08:34 PM
Make a 30 Mb file available for download by web surfers jlgreer1 Linux - Server 2 11-18-2007 04:14 PM
best distrubition for nas server and p2p download server and web server geosko Linux - Distributions 8 10-13-2006 09:20 AM
web server wants me to download something... Geminias Linux - Networking 2 07-22-2006 08:56 AM


All times are GMT -5. The time now is 08:49 PM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration