I just installed this on a 6.20 drupal server.
File downloads are private
I created a new dir listing, pointed to /var/www/html/files , with a url alias of /files
The folder already contained a set of files and folders. All files belong to the apache user and group, with rwx permissions on all folders
When I access http://myserver/files I get a correct listing of all files and folder
when I open any subfolder, it shows as empty, even though there are files on the flesystem.
If I create a new dir from /file, it creates OK, on the filesystem too. When I open that folder it's also empty (normal) but hs an 'up' link that the other forlders do have.
Maybe I missed something, is there an operation required to index the existing files ?
Thanks in advance.
Comments
Comment #1
Nicolas Georget commentedYou mean you create or modify the httpd.conf with something like that:
So you must have the command
Options +Indexesinside the httpd.conf right ?If this case, it appears empty for Apache also ? or only for filebrowser module ?
Have you try with a test folder which is not a url alias ?
Comment #2
ehanuise commentedOoops sorry, I do not mean an alias at apache or at filesystem level, I mean a Drupal path.
http://drupal/files points to /node/1102 which is my folder's node in filebrowser.
The problem reported above is within filebrowser+drupal, sorry for the confusion.
Comment #3
ehanuise commentedTo make the issue very clear :
- Filebrowser is installed and configured
- I have a folders and files tree in /var/www/html/files
- I have created a new 'dir-listing' node in create content (nid 1102)
- I have set 'files' as path alias in Drupal for that node
- http://drupal/files (or http://drupal/node/1102 for that matter) calls filebrowser and displays the folder's content
- I can upload and download files OK, and they correctly appear in the filesystem as well when I check from the server console
- I can create a new folder, and when I open it I see filebrowser adds automatically a link to parent directory (nice !)
- However when i open a preexisting directory from my filetree, it shows empty even though on the filesystem there are files and folders in it
'hope this makes it clearer :)
Comment #4
Nicolas Georget commentedThat's perfectly clear. And i tried to reproduce your case.... And works perfectly...
So let's see that in few steps :
node_dir_listingandnode_dir_listing_contentif filebrowser recorded all the subdirectories of the nid=1102Comment #5
ehanuise commentedI've got no phpmyadmin on this machine, but I can do it in console ;) Here's the DB contents :
One record in node_dir_listing, 470 in node_dir_listing_contents.
Is that what should be in there ?
mysql> select * from node_dir_listing;
+------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| nid | folder_path | properties |
+------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1102 | /var/www/html/IMG/files | O:8:"stdClass":4:{s:13:"folder_rights";O:8:"stdClass":6:{s:15:"explore_subdirs";i:1;s:16:"download_archive";i:1;s:14:"create_folders";i:1;s:16:"download_manager";s:7:"private";s:15:"forbidden_files";s:0:"";s:14:"filtered_files";s:0:"";}s:19:"folder_presentation";O:8:"stdClass":6:{s:12:"default_view";s:9:"list-view";s:8:"encoding";s:5:"UTF-8";s:14:"hide_extension";i:0;s:15:"visible_columns";a:5:{s:4:"icon";b:1;s:12:"display-name";b:1;s:7:"created";b:1;s:4:"size";b:1;s:8:"modified";b:1;}s:12:"default_sort";s:12:"display-name";s:18:"default_sort_order";s:3:"asc";}s:14:"folder_uploads";O:8:"stdClass":3:{s:7:"enabled";i:1;s:15:"allow_overwrite";i:1;s:23:"accepted_uploaded_files";s:0:"";}s:13:"file_handlers";N;} |
+------+-------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select * from node_dir_listing_content;
+------+------+---------+-------------------------------------------------------------------------------------------------------------+
| nid | fid | root | path |
+------+------+---------+-------------------------------------------------------------------------------------------------------------+
| 1102 | 2333 | / | /filename.pdf |
(snip)
+------+------+---------+-------------------------------------------------------------------------------------------------------------+
470 rows in set (0.01 sec)
Regarding PHP version :
[root@Drupal]# php -v
PHP 5.2.10 (cli) (built: Nov 13 2009 11:24:03)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Nothing in the apache or system logs.
I have this in the drupal event log :
Location http://drupal/node/add/dir-listing
mkdir() [function.mkdir]: Permission denied in /var/www/html/sites/all/modules/filebrowser/filebrowser.module on line 313.
Location http://drupal/node/1102/704
Referrer http://drupal/node/1102/704
Message mkdir() [function.mkdir]: Permission denied in /var/www/html/sites/all/modules/filebrowser/filebrowser.module on line 690.
Comment #6
ehanuise commentedAnd these too :
Location http://drupal/admin/content/node-type/dir-listing
Referrer http://drupal/admin/content/node-type/dir-listing
Message Unknown column 'status' in 'field list' query: UPDATE locales_target SET status = 1 WHERE lid = 9687 in /var/www/html/sites/all/modules/i18n/i18nstrings/i18nstrings.module on line 448.
Comment #7
Nicolas Georget commentedOk. You have clearly a problem with the perms. Can you post the output of the command
cd /var/www/html/IMG/files && ls -al?You server is an UNIX or a Mac OS X ? have you set ACL ?
Next, you have to try this also:
2 things for the issue:
node_dir_listing_contenthas only one record: a File named "/filename.pdf"Comment #8
ehanuise commentedIt's a linux box, running centos5, apache2 and php 5.3
Filesystem perms seems ok :
(filenames removed)
[root@ServDrupal IMG]# ls -alh
total 548K
drwxr-xr-x 11 apache apache 4.0K Jan 19 16:56 .
drwxrwxrwx 12 root root 4.0K Jan 19 16:56 ..
drwxrwxrwx 2 apache apache 4.0K Sep 2 14:10 xxxx
drwxrwxr-x 4 apache apache 4.0K Sep 29 17:17 xxxx
drwxrwxr-x 4 apache apache 4.0K Sep 28 16:36 xxxx
drwxrwxr-x 2 apache apache 4.0K Sep 8 11:58 xxxx
drwxrwxr-x 11 apache apache 36K Jan 19 17:19 xxxx
-rw-rw-r-- 1 apache apache 181K Sep 2 14:12 xxxx
-rw-rw-r-- 1 apache apache 93 Sep 2 14:10 .htaccess
drwxrwxr-x 8 apache apache 4.0K Dec 2 16:54 xxxx
drwxrwxr-x 2 apache apache 4.0K Jan 20 15:16 xxxx
drwxrwxr-x 4 apache apache 4.0K Dec 21 11:07 xxxx
-rw-rw-r-- 1 apache apache 81K Sep 8 12:47 xxxx
-rw-rw-r-- 1 apache apache 7.3K Sep 8 11:35 xxxx
-rw-rw-r-- 1 apache apache 28K Jan 19 16:10 xxxx
-rw-rw-r-- 1 apache apache 6.2K Sep 22 17:12 xxxx
-rw-rw-r-- 1 apache apache 7.3K Sep 29 17:05 xxxx
-rw-rw-r-- 1 apache apache 40K Sep 2 14:12 v
drwxrwxr-x 2 apache apache 4.0K Jan 24 11:59 xxxx
-rw-rw-r-- 1 apache apache 7.3K Sep 29 17:13 xxxx
-rw-rw-r-- 1 apache apache 7.3K Sep 29 17:17 xxxx
[root@ServDrupal IMG]#
I'll investigate perms furter, but so far i'm puzzled.
Comment #9
Nicolas Georget commentedAre you sure there's nothing wrong in the .htaccess ?
Have you tried also to make a new dir-list with an empty folder ?
Comment #10
ehanuise commentedthe htaccess contains this :
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks
When I do create a new dirlist with an emmptyy folder, of a new folder in the existing dirlist trough the interface, it works just fine.
Comment #11
ehanuise commentedI carefully reviewed the permissions of all files and folders.
When they are rwxrwx-- (770) for the apache.apache user.group , it doesn't work.
However with rwxrwxrwx (777) permissions the subfolder contents do appear correctly.
I'm puzzled as why this is, especially as I have private downloads so it should be the apache user that access the files.
Anyways, closed as solved :)