Problem with content files.. Please help.

Bugs Reports and Useful Links

Problem with content files.. Please help.

Postby stephane » Sun Oct 24, 2010 4:05 pm

I need a solution to solve a small problem.
eFront version 3.6.6 build 8242

Exemple, this file is located in :
mydomain.com/content/lessons/11/structure_generale.swf

I don't understand why this file are on the server but impossible to view in lesson (student or professor). In 'Shared files' on the homepage student, the file can be downloaded and show (work perfectly)... In lesson page, no. Html ok...

If direct link :
mydomain.com/content/lessons/11/structure_generale.swf

Message :
Forbidden
You don't have permission to access /content/lessons/11/structure_generale.swf on this server.

I think it's normal to protect content course files, but the problem results certainly from there.
stephane
 
Posts: 3
Joined: Sun Oct 24, 2010 4:02 pm

Re: Problem with content files.. Please help.

Postby papagel » Mon Oct 25, 2010 1:12 pm

Until the upcoming 3.6.7 eFront do not enforce security for files inside lessons (assuming that someone know the exact url). So my suggestion is to check the .htaccess files on your installations for such limitations.

Starting from 3.6.7 eFront will support content restrictions in a systematic way. I copy here a short tutorial that will be included on our wiki upon the release of 3.6.7

Content Restriction on eFront 3.6.7+
---
A. Through .htaccess file:
1. We make sure that our apache setup allows overriding configuration through .htaccess files (must have "AllowOverride: All" in httpd.conf file)
2. We create a .htaccess files with the following directives, and place it inside the root folder of our efront installation. If a .htaccess file already exists there, we append the directives to its end
<IfModule rewrite_module>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)\/content\/lessons\/.*$
RewriteRule !^((.*.php)|(.*\/))$ %1/view_file.php?server=1
</IfModule>

B. Through httpd.conf: We embed the directive above inside the "<Directory>" part of our current installation
eFront- eLearning and Skill Development Solution for Companies and Educational Institutes
User avatar
papagel
 
Posts: 1568
Joined: Wed Oct 03, 2007 5:07 pm

Re: Problem with content files.. Please help.

Postby mlehtola » Thu Mar 31, 2011 12:35 pm

papagel wrote:
Content Restriction on eFront 3.6.7+
---
A. Through .htaccess file:
1. We make sure that our apache setup allows overriding configuration through .htaccess files (must have "AllowOverride: All" in httpd.conf file)
2. We create a .htaccess files with the following directives, and place it inside the root folder of our efront installation. If a .htaccess file already exists there, we append the directives to its end
<IfModule rewrite_module>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} ^(.*)\/content\/lessons\/.*$
RewriteRule !^((.*.php)|(.*\/))$ %1/view_file.php?server=1
</IfModule>

B. Through httpd.conf: We embed the directive above inside the "<Directory>" part of our current installation


Hi, I'm using the latest Community++ version and having a small problem with Professor-account. I think it's related to above, because when I rename .../content/.htaccess to something else everything seems to work. I'm using subdomain for eFront.

What happens:
with admin account - no problems creating stuff etc.
with professor account - when editing lessons, I sometimes get "403 forbidden...You don't have permission to access professor.php on this server" errors and can't save the lesson that I have modified. This does not happen everytime thought, which is weird.

Any ideas? I really would like to protect my content somehow and without that .htaccess it's not working!
mlehtola
 
Posts: 4
Joined: Thu Mar 31, 2011 12:20 pm
Location: Finland

Re: Problem with content files.. Please help.

Postby periklis » Thu Mar 31, 2011 12:38 pm

Hello,
as a first measure, could you try picking up the file www/view_file.php from our public svn? It's updated and it may have to do with this issue (it also enables locking files to students that are actually enrolled to the specific lesson, not everyone logged in to the platform).
Periklis Venakis
eFront- eLearning and Skill Development Solution for Companies and Educational Institutes
Consider our wide range of added-value services to get things running smoothly on your eLearning environment
periklis
 
Posts: 4372
Joined: Thu Oct 04, 2007 10:54 am

Re: Problem with content files.. Please help.

Postby mlehtola » Thu Mar 31, 2011 6:30 pm

Hi, no luck, just getting worse (pictures in lessons are not working).
mlehtola
 
Posts: 4
Joined: Thu Mar 31, 2011 12:20 pm
Location: Finland

Re: Problem with content files.. Please help.

Postby periklis » Thu Mar 31, 2011 8:54 pm

Can you try again please? I have made another change
Periklis Venakis
eFront- eLearning and Skill Development Solution for Companies and Educational Institutes
Consider our wide range of added-value services to get things running smoothly on your eLearning environment
periklis
 
Posts: 4372
Joined: Thu Oct 04, 2007 10:54 am

Re: Problem with content files.. Please help.

Postby mlehtola » Sat Apr 02, 2011 4:26 pm

Pictures are now fine, but still the same error while saving.

btw. should I create httpd.conf file? If so, where?
mlehtola
 
Posts: 4
Joined: Thu Mar 31, 2011 12:20 pm
Location: Finland

Re: Problem with content files.. Please help.

Postby periklis » Sat Apr 02, 2011 6:02 pm

hello,
you mean you still get the 403 error? Can you access the server's error log files to see if something is written there that could help us find the cause of the problem.
You don't have to create a httpd.conf file
Periklis Venakis
eFront- eLearning and Skill Development Solution for Companies and Educational Institutes
Consider our wide range of added-value services to get things running smoothly on your eLearning environment
periklis
 
Posts: 4372
Joined: Thu Oct 04, 2007 10:54 am

Re: Problem with content files.. Please help.

Postby mlehtola » Sat Apr 02, 2011 7:00 pm

periklis wrote:hello,
you mean you still get the 403 error?


Hi, yes, the same error.

periklis wrote:Can you access the server's error log files to see if something is written there that could help us find the cause of the problem.
You don't have to create a httpd.conf file


Log is not very advanced, but here's a collection about different errors that are (I guess) related to efront:

(efront installation folder is swkoulu)

[Sat Apr 02 19:52:54 2011] [error] [client xx.xxx.xx.xxx] File does not exist: /home/sloworks/public_html/swkoulu/www/404.shtml
[Sat Apr 02 19:52:54 2011] [error] [client xx.xxx.xx.xxx] File does not exist: /home/sloworks/public_html/swkoulu/www/favicon.ico
[Sat Apr 02 19:52:53 2011] [error] [client xx.xxx.xx.xxx] File does not exist: /home/sloworks/public_html/swkoulu/www/404.shtml, referer: http://swkoulu.sloworks.fi/index.php?logout=true
[Sat Apr 02 19:33:22 2011] [error] [client xx.xxx.xx.xxx] File does not exist: /home/sloworks/public_html/swkoulu/www/403.shtml, referer: http://swkoulu.sloworks.fi/professor.ph ... t&edit=117
[Sat Apr 02 19:09:19 2011] [error] [client xx.xxx.xxx.xxx] SSI directive was not properly finished at the end of parsed document /home/sloworks/public_html/404.shtml

117 is the lesson that I tried to save and got the error. Hope this helps. I'll check if I can found better logs.
mlehtola
 
Posts: 4
Joined: Thu Mar 31, 2011 12:20 pm
Location: Finland

Re: Problem with content files.. Please help.

Postby periklis » Sun Apr 03, 2011 6:45 pm

I've sent you a pm requesting more info
Periklis Venakis
eFront- eLearning and Skill Development Solution for Companies and Educational Institutes
Consider our wide range of added-value services to get things running smoothly on your eLearning environment
periklis
 
Posts: 4372
Joined: Thu Oct 04, 2007 10:54 am

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests

cron