LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-28-2022, 05:37 AM   #1
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Rep: Reputation: 18
403 lighttpd server active but permission denied


hi all-

Please see below for partial error log, access log, and server status.

I try to enter http://127.0.0.1:80/info.php and below is the output.
Everytime I type the url into the address bar that into firefox it ends up being:
http://127.0.0.1/info.php without the port in the url.

I'm using fedora 36 and php 7.4.29.

I hope that someone can point me in the right direction to get rid of the forbidden 403.

Thanks for any help!
roboloki

Code:
2022-05-28 06:20:46: (server.c.1568) server started (lighttpd/1.4.64)
2022-05-28 06:20:46: (keyvalue.c.90) pcre2_jit_compile: no more memory, regex: ~$
2022-05-28 06:21:21: (response.c.402) -- parsed Request-URI
2022-05-28 06:21:21: (response.c.404) Request-URI     : /info.php
2022-05-28 06:21:21: (response.c.406) URI-scheme      : http
2022-05-28 06:21:21: (response.c.408) URI-authority   : 127.0.0.1
2022-05-28 06:21:21: (response.c.410) URI-path (clean): /info.php
2022-05-28 06:21:21: (response.c.412) URI-query       :
2022-05-28 06:21:21: (response.c.490) -- logical -> physical
2022-05-28 06:21:21: (response.c.492) Doc-Root     : /home/user/abyssws/htdocs
2022-05-28 06:21:21: (response.c.494) Basedir      : /home/user/abyssws/htdocs
2022-05-28 06:21:21: (response.c.496) Rel-Path     : /info.php
2022-05-28 06:21:21: (response.c.498) Path         : /home/user/abyssws/htdocs/info.php
2022-05-28 06:21:21: (response.c.188) -- : Permission denied
Code:
127.0.0.1 127.0.0.1 - [28/May/2022:06:21:21 -0400] "GET /info.php HTTP/1.1" 403 341 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0"
Code:
[root@fedora lighttpd]# service lighttpd status
Redirecting to /bin/systemctl status lighttpd.service
● lighttpd.service - Lightning Fast Webserver With Light System Requirements
     Loaded: loaded (/usr/lib/systemd/system/lighttpd.service; disabled; vendor preset: disabled)
     Active: active (running) since Sat 2022-05-28 06:20:46 EDT; 6s ago
   Main PID: 3018 (lighttpd)
      Tasks: 1 (limit: 5177)
     Memory: 1.5M
        CPU: 5ms
     CGroup: /system.slice/lighttpd.service
             └─ 3018 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf

May 28 06:20:46 fedora systemd[1]: Started lighttpd.service
 
Old 05-28-2022, 06:13 AM   #2
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Original Poster
Rep: Reputation: 18
Hi all-

I wanted to give another diagnostic message.

type=AVC msg=audit(1653734753.230:293): avc: denied { execmem } for pid=4003 comm="lighttpd" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:system_r:httpd_t:s0 tclass=process permissive=0

netstat -tulpn | grep 4003
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4003/lighttpd

I am not sure what it means. It might have to do with selinux.

thanks,
roboloki

Last edited by mtdew3q; 05-28-2022 at 06:17 AM.
 
Old 05-28-2022, 07:06 AM   #3
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Original Poster
Rep: Reputation: 18
Hi all-

more diagnostics
-rw-r--r--. 1 user lighttpd 1.3K Sep 16 2021 index.html
-rw-r--r--. 1 user lighttpd 20 May 27 18:44 info.php
-rw-r--r--. 1 user lighttpd 1.9K Sep 16 2021 pwrabyss.gif
[root@fedora htdocs]# cd ../
[root@fedora abyssws]# ls -lhd htdocs/
drwxr-xr-x. 1 user lighttpd 60 May 27 18:44 htdocs/

thanks
 
Old 05-28-2022, 09:01 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by mtdew3q View Post
Code:
-rw-r--r--. 1 user lighttpd 1.3K Sep 16  2021 index.html
-rw-r--r--. 1 user lighttpd   20 May 27 18:44 info.php
-rw-r--r--. 1 user lighttpd 1.9K Sep 16  2021 pwrabyss.gif
[root@fedora htdocs]# cd ../
[root@fedora abyssws]# ls -lhd htdocs/
drwxr-xr-x. 1 user lighttpd 60 May 27 18:44 htdocs/
Please use CODE tags for full command output and code (see my signature).

What are those dots behind the permissions. e.g. -rw-r--r--.? I don't have those.

What user and group is httpd running as?
 
Old 05-28-2022, 03:43 PM   #5
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Original Poster
Rep: Reputation: 18
re: 403 lighttpd service active but permission denied

hi-

lighttpd is running as lighttpd:lighttpd. I switched the user in my html doc directoy. I asked a security question in the security forum. It was a specific selinux policy question too.

I'm working on killing the dots at this link https://rsydigitalworld.com/how-to-r...sion-in-linux/

thanks for helping,
roboloki

Code:
[root@fedora htdocs]# ls -lh
total 12K
-rw-r--r--. 1 user user 1.3K Sep 16  2021 index.html
-rw-r--r--. 1 user user   20 May 27 18:44 info.php
-rw-r--r--. 1 user user 1.9K Sep 16  2021 pwrabyss.gif

[root@fedora htdocs]# groups user
user : user wheel lighttpd
Code:
[root@fedora abyssws]# ls -lhd htdocs/
drwxr-xr-x. 1 user user 60 May 27 18:44 htdocs/
 
Old 05-28-2022, 05:46 PM   #6
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Original Poster
Rep: Reputation: 18
Hi all-

I'm switching to abyss web server.

Please disregard.

thanks
 
Old 05-29-2022, 12:35 AM   #7
mtdew3q
Member
 
Registered: Mar 2006
Location: the next town over from siberia
Distribution: xubuntu
Posts: 481

Original Poster
Rep: Reputation: 18
HI Ondoho-

I got lucky and figured out my 403 error. I did some tricks so it would pick up the right php.ini. I ended up switching to abysss server. Now I have my php_amf3 extension loaded in the phpinfo() page.

It took me a long time because when I went to execute my php-cgi in the abyss webserver it needed 2 switches and i forgot to supply one where the server lets you specify the arguments to execute php-cgi with.

I still don't know why lighttpd gave me those 403 forbidden errors.

Thanks for helping,
roboloki
 
  


Reply



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
LAN webserver lighttpd errors 403, dir-listing enabled galen Linux - Software 1 01-25-2020 07:57 AM
lighttpd 403 errors galen Linux - Server 6 11-20-2018 03:03 AM
[SOLVED] Lighttpd + php_cgi = 403 Forbidden? alienDog Linux - Server 1 01-08-2013 12:33 AM
permission with lighttpd, linux permission... evermore Linux - Newbie 6 04-16-2011 12:34 AM
"lighttpd" giving 403 Forbidden error nishith Linux - Server 2 05-29-2010 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 09:39 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