TheProjecter / osfilemanager

Automatically exported from code.google.com/p/osfilemanager
0 stars 0 forks source link

Files being read as directories #39

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Log in as admin
2. Click Browse

What is the expected output? 

I would have expected to see a list of the files in the directory I have 
configured as admin's home (/var/www/xml/journals/docs)

What do you see instead?

The three files are being interpreted as directories:
Directory 'A30054-M6523-D801-6-UG19_en_INT.pdf' is unreadable.
Directory 'ejournals-slides.pdf' is unreadable.
Directory 'ejournals.pdf' is unreadable.

What version of the product are you using? 

2.2

On what operating system? 

RHEL5 with PHP5.3.3

On what web host?

http://epu.ucc.ie/

Please provide any additional information below.

Installation went OK (included changing the db prefix to osfm_). Directory 
/var/www/xml/journals/docs is group-owned by apache and is set g+rw. Uploading 
a file worked fine (the A30054-M6523-D801-6-UG19_en_INT.pdf file above), but 
the directory will not list as files.

A related issue may be that if I try to create a subdirectory "test" in there, 
I get The directory, '//test', could not be created. Check to make sure the 
permisions on the directory is set to '0777'
Apache could upload a file there OK, so why not create a directory? And why is 
it reporting //test?

Original issue reported on code.google.com by anglebra...@gmail.com on 22 Nov 2011 at 4:44

GoogleCodeExporter commented 9 years ago
Hah. Found it. When you set up a server directory in a user's details, it MUST 
end with a slash. This needs to be specified in the docs. A workaround is to 
add the following line after line 114 in index.php

if ($userdir[strlen($userdir)-1] != '/') $userdir = $userdir.'/';

///Peter

Original comment by anglebra...@gmail.com on 23 Nov 2011 at 3:17