Author Topic: index 403 forbidden - show directory listing of files  (Read 5404 times)

NukeSter

  • Newbie
  • *
  • Posts: 25
    • View Profile
index 403 forbidden - show directory listing of files
« on: December 06, 2014, 04:15:56 pm »
When i try to look at a folder in my hosting directory i see 403 forbidden i would like to see the index of the files. I need this for my fast download for my gaming servers.
« Last Edit: April 30, 2019, 03:18:50 pm by earnolmartin »

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 304
    • View Profile
Re: inedx/ 403 forbbidden
« Reply #1 on: December 07, 2014, 07:34:44 pm »
EHCP Force by default turns the default listing of files off.  However, it can be re-enabled.  I will send you a command that will work when I'm home.

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 304
    • View Profile
Re: inedx/ 403 forbbidden
« Reply #2 on: December 07, 2014, 10:50:33 pm »
Run this command with sudo permissions:

Code: [Select]
sudo -i
APACHE2Conf="/etc/apache2/apache2.conf"
if [ -e "$APACHE2Conf" ]; then
sed -i "s/^Options.*/Options +Indexes +FollowSymLinks/g" "$APACHE2Conf"
service apache2 restart
fi

You should now be able to see a list of files if there is no index in a directory. 

NukeSter

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: index/ 403 forbidden
« Reply #3 on: December 08, 2014, 12:17:40 pm »
Worked like a charm.

Thank you. :)

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 304
    • View Profile
Re: index/ 403 forbidden
« Reply #4 on: December 09, 2014, 09:01:07 pm »
Cool, thanks for letting me know that it worked.

NukeSter

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: index/ 403 forbidden
« Reply #5 on: February 15, 2015, 11:29:00 am »
This command doesnt work on 14.10 ubuntu i get this when i run the command.

Welcome to Ubuntu 14.10 (GNU/Linux 3.16.0-30-generic i686)

 * Documentation:  https://help.ubuntu.com/
Last login: Sun Feb 15 06:11:51 2015 from cpe84948c51dee1-cm84948c51dee0.cpe.net.cable.rogers.com
root@install:~# sudo -i
root@install:~# APACHE2Conf="/etc/apache2/apache2.conf"
root@install:~# if [ -e "$APACHE2Conf" ]; then
> sed -i "s/^Options.*/Options +Indexes +FollowSymLinks/g" "$APACHE2Conf"
> service apache2 restart
> fi
 * Restarting web server apache2                                                [Sun Feb 15 18:26:44.365527 2015] [alias:warn] [pid 9162] AH00671: The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
                                                                         [ OK ]
root@install:~#

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 304
    • View Profile
Re: index/ 403 forbidden
« Reply #6 on: March 03, 2015, 05:41:35 pm »
Are you saying it didn't work solely because of the information message output by apache?  Specifically, this:

Quote
[Sun Feb 15 18:26:44.365527 2015] [alias:warn] [pid 9162] AH00671: The Alias directive in /etc/apache2/conf.d/phpmyadmin.conf at line 3 will probably never match because it overlaps an earlier Alias.
                                                                         [ OK ]

If you are basing that claim on the message that was output by apache, it probably worked.

After running the command, does it still not display a directory listing?

Loren Tedford

  • Jr. Member
  • **
  • Posts: 58
  • I love Amateur Radio, VPS and Minecraft!
    • View Profile
    • Welcome to Lorentedford.com
Re: index/ 403 forbidden
« Reply #7 on: April 15, 2015, 03:28:36 am »
Ok this issue has been resolved I honestly do not know what i did to fix this issue or what happened there is so much i was reading on with postfix..

I did perform the update twice
sudo apt-get install subversion
cd ~/Downloads
if [ -e "ehcpforceupdate.sh" ]; then
    rm "ehcpforceupdate.sh"
fi
svn export "svn://svn.code.sf.net/p/ehcpforce/code/trunk/ehcpforce/ehcp/ehcpforceupdate.sh"
sudo bash "ehcpforceupdate.sh"

here is a list of web browsers i was in the process of using when things magically started working..
http://www.postfix.org/VIRTUAL_README.html
http://www.postfix.org/SMTPD_ACCESS_README.html
http://serverfault.com/questions/628856/relay-access-denied-when-sending-email-via-php-mail-in-zpanel
https://www.google.com/search?client=ubuntu&channel=fs&q=454+4.7.1&ie=utf-8&oe=utf-8

this here was an error i googled that i got when i tried sending mail 454 4.7.1

now for some reason my connection is untrusted example https://www.lorentedford.com

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 304
    • View Profile
Re: index/ 403 forbidden
« Reply #8 on: April 16, 2015, 12:21:18 am »
It's a self-signed SSL certificate.  It will do that.  Browsers trust root certificate authorities by default, not self signed certs.

earnolmartin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 304
    • View Profile
Re: index/ 403 forbidden
« Reply #9 on: April 30, 2019, 03:18:23 pm »
For nginx, you could edit a specific domain template (or global web server template) and turn autoindex on as mentioned here:

https://nginxlibrary.com/enable-directory-listing/