Access to pdf file

Author Message

narilalaina fabrice

Wednesday 03 November 2010 8:24:44 am

Hi all

I tried to access to a pdf file with <a href="{'/var/pdfDirectory/mypdf.pdf'|ezroot(no)}">my pdf</a>

but I got :"Forbidden You don't have permission to.."

I already gave full grant to the directory

Thks

Heath

Wednesday 03 November 2010 8:40:50 am

Hello narilalaina,

Welcome to the eZ Community!

It appears you have a webserver configuration error.

Cheers,

Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Christian Rößler

Wednesday 03 November 2010 9:14:34 am

Hy,

please check your ".htaccess" file which should reside in the ezpublish installation directory right beside index.php .
Locate the lines which might reflect access restrictions to folders under /var/... and/or filetypes.
If you are using the stock htaccess-root file, change the following lines

...
<FilesMatch "(^index\.php|favicon\.ico|index_treemenu\.php|\.(gif|jpe?g?|png|css|js|swf|html?|jar)|var(.+)storage.pdf(.+)\.pdf)$">
...
RewriteRule !(\.(gif|jpe?g?|png|css|js|swf|html?|jar)|var(.+)storage.pdf(.+)\.pdf)$ index.php
... 

to

...
<FilesMatch "(^index\.php|favicon\.ico|index_treemenu\.php|\.(gif|jpe?g?|png|css|js|swf|html?|jar|pdf)|var(.+)storage.pdf(.+)\.pdf)$">
...
RewriteRule !(\.(gif|jpe?g?|png|css|js|swf|html?|jar|pdf)|var(.+)storage.pdf(.+)\.pdf)$ index.php 

But of course you can and should use a more specific rule other than globally enable access to pdf-files like I did above. Please ensure not to open (in terms of security) your server. Also make sure to understand the terms above before adding them to your server.

Of course it might be possible, that "Access denied" comes from a complete other source and the stuff above is not the cure.

cheers,

chris

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 10:41:43
Script start
Timing: Jan 18 2025 10:41:43
Module start 'layout'
Timing: Jan 18 2025 10:41:43
Module start 'content'
Timing: Jan 18 2025 10:41:43
Module end 'content'
Timing: Jan 18 2025 10:41:43
Script end

Main resources:

Total runtime0.7177 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.7891152.6094
Module start 'layout' 0.00600.0030 740.398439.4219
Module start 'content' 0.00910.7072 779.8203568.8984
Module end 'content' 0.71620.0014 1,348.718812.1875
Script end 0.7176  1,360.9063 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4790160.0002
Check MTime0.00130.1861160.0001
Mysql Total
Database connection0.00110.153410.0011
Mysqli_queries0.664692.5911590.0113
Looping result0.00070.0988570.0000
Template Total0.681695.020.3408
Template load0.00230.318020.0011
Template processing0.679394.644220.3396
Template load and register function0.00020.026510.0002
states
state_id_array0.00240.329710.0024
state_identifier_array0.00130.187520.0007
Override
Cache load0.00190.2710270.0001
Sytem overhead
Fetch class attribute can translate value0.00060.079630.0002
Fetch class attribute name0.00180.251440.0005
XML
Image XML parsing0.00070.103930.0002
class_abstraction
Instantiating content class attribute0.00000.001640.0000
General
dbfile0.00070.1012170.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs