folder access problem: error 403 - forbiddn

Discussion in 'Installation/Configuration' started by pawan, Nov 6, 2011.

  1. pawan

    pawan Member HowtoForge Supporter

    I have created the folder in ISPconfig 3.04 control panel with the user & password.

    The folder is created all right in the website and prompting for the username & password, but on submission I am getting the error

    error:403 - forbidden
    The following error occurred:

    You are not permitted to access the requested URL.

    Please contact the webmaster with any queries.

    Note:There is a joomla installation in the same webspace, is joomla prohibiting the folder access.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    which error message do you get in the error.log of the website?
     
  3. pawan

    pawan Member HowtoForge Supporter

    I am getting this error in the error log.

    Directory index forbidden by Options directive: /var/www/domain.tld/web/mydoc/
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok. So there is no index file in the directory like index.htm or index.php which can be displayed by apache. The error is not related to the folder protection.

    Add i index file or specufy the exact filename that you want to view in that folder in the browser address bar.
     
  5. pawan

    pawan Member HowtoForge Supporter

    Pardon me, I didn't get you, what I should do.
    BTW I have tried adding a line in the vhost file -like this that is adding line option indexes below options FollowSymlinks

    <Directory /var/www/domain.tld/web>
    Options FollowSymLinks
    Options Indexes
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    <Directory /var/www/clients/client2/web13/web>
    Options FollowSymLinks
    Options Indexes
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

    and I am able to access the directory listing instead of the error.
    but now I am facing another problem.

    The folder created is having a root user permission and I am not able to upload any files in that folder via ftp.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the folder did not exist before you protected it. You will have to chown it to the web user and client group manually now. I recommend that you create the folder next time before you protect it.

    If you want to add a apache directive for a vhost, then better do this in the apache directives field of the website or add it to the .htacess file. Never edit the vhost file manually, as all manual changes will get removed automatically.
     
    Last edited: Nov 6, 2011
  7. pawan

    pawan Member HowtoForge Supporter

    I created the folder first and then protected it, its working fine.

    First - was it ok to insert that line - option indexes ?

    second - how I can add a line in apache directive field to go right in that section ?

    Thanks.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    1) thats ok, but you should not do this for the whole web directory. Also this is only useful if you really need a listing and can not use the direct file urls as i recommened in my first post.

    2) Create a new section for the directory of the protected folder instead of modifying a ispconfig section.
     
  9. pawan

    pawan Member HowtoForge Supporter

    Thank you so much.
    But I think that when we have included an option to create a protected folder inside ispconfig, will it not be OK to create that folder with the right user permsission automatically and to add the apache directive also in the vhost automatically.

    just like for example for WEBDAV.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The function you used was originally made to protect existing folders. There are no additional directives required for that functionality as a directory listing is not intended for the folder. I will consider to add the features you suggested e.g. By adding a checkbox to enable directory listings for the folder.
     
    Last edited: Nov 6, 2011

Share This Page