LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-19-2018, 08:02 AM   #1
galen
Member
 
Registered: Sep 2003
Location: Halifax, Nova Scotia, Canada
Distribution: MX, Xubuntu, Zorin. BOYCOTTING: Vector, Beatrix, BLAG, Slackware. Life banned from: Facebook, Yahoo!
Posts: 190
Blog Entries: 1

Rep: Reputation: Disabled
lighttpd 403 errors


running lighttp webserver
config
port 80
user www-data
group www-data

www-data dir /home/west/Movies
also tried /var/www/html
ownership www-data www-data
rw-r--r--
from local browser 127.0.0.7
returns 403
index lighttp.html exists

# sudo lighttp-enable-mod dir-listing
done
#sudo service lighttpd stop
#sudo service lighttpd restart
#sudo service lighttpd force-reload
#sudo service lighttpd status
all report no errors
but still browser returns 403
sudo netstat -t -l -p
shows lighttpd serving on port 80

any ideas why 403?
 
Old 11-19-2018, 08:36 AM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,708

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
An “index” file must be named index.htm(l), absent changes in configuration.
It’s also not clear what the permissions of your DirectoryRoot are. A 403 error indicates a permission or authority issue.
 
Old 11-19-2018, 12:06 PM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Quote:
any ideas why 403?
The first thing to do in cases like that, is to look at the lighttpd error.log for hints.
 
Old 11-19-2018, 01:17 PM   #4
galen
Member
 
Registered: Sep 2003
Location: Halifax, Nova Scotia, Canada
Distribution: MX, Xubuntu, Zorin. BOYCOTTING: Vector, Beatrix, BLAG, Slackware. Life banned from: Facebook, Yahoo!
Posts: 190

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
An “index” file must be named index.htm(l), absent changes in configuration.
It’s also not clear what the permissions of your DirectoryRoot are. A 403 error indicates a permission or authority issue.
# sudo lighttp-enable-mod dir-listing
so no index is needed

permissions have been set :
user:user did not work
www-data:www-data did not work

restarted service, reloaded, rebooted over days, did not work

error log shows no errors
 
Old 11-19-2018, 07:45 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,708

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Um. Show us the permissions you've set on the parent directory and the file/page you're wanting to load.
Hard to believe there's no indications in the logs...
 
Old 11-20-2018, 02:28 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Quote:
Originally Posted by galen View Post
# sudo lighttp-enable-mod dir-listing
so no index is needed

permissions have been set :
user:user did not work
www-data:www-data did not work

restarted service, reloaded, rebooted over days, did not work

error log shows no errors
What about access.log? Does it log the 403 respones?
I'm not familiar with lighttpd logging, but according to this, you can enable debugging to see if you get something useful.


Quote:
Originally Posted by scasey View Post
Um. Show us the permissions you've set on the parent directory and the file/page you're wanting to load.
Hard to believe there's no indications in the logs...
Also to add to what scasey posted above, make sure that the docroot directory has 755 permissions and the files just 644.
 
Old 11-20-2018, 03:03 AM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
If all permissions appear correct, perhaps your system uses SELinux, and the web files have the wrong label. You should then have messages in /var/log/audit/audit.log (at least if it is RHEL or a derivative).
 
  


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
[SOLVED] SSL on Lighttpd - 404 errors Joe of Loath Linux - Server 1 10-25-2013 02:39 PM
[SOLVED] Lighttpd + php_cgi = 403 Forbidden? alienDog Linux - Server 1 01-08-2013 12:33 AM
"lighttpd" giving 403 Forbidden error nishith Linux - Server 2 05-29-2010 11:32 AM
Errors, Errors, and more Errors (KDE 3.4.x GUI Errors) Dralnu Linux - Software 2 05-13-2006 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:47 AM.

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