Files uploaded via IMCE are visible as they go into the user's root directory, but the user's subfolders and files are not visible (I use a cck FileField to upload files into those folders). The file system root = "../private/files". For User-1, the Directory path is set to "../private/files/." by default. User-1 can access everything, as well as anyone with User-1 IMCE Profile.

Using a duplicate profile but changing the user's directories: "../private/files/%uid", the users cannot view their own subfolders, even though "Including subdirectories" is checked.

There are multiple sub-folders for each user. If I set their access to, for instance, ../private/files/%uid/project/files then they can view the files in that particular folder. I'd like for them to have access to the whole tree under their user id.

Comments

cindyr’s picture

Is no one else having this problem? It seems rather significant to me...

cindyr’s picture

Status: Active » Needs review

OK, I don't know if this will work for all situations, but it works for mine. I have a private file system, and all users upload their files to sub-folders under their uid folder at directory_root/%uid, e.g., into directory_root/%uid/project.

In page.inc I changed this:

    $dirname = ($imce['dir'] == '.' ? '' : $imce['dir'] .'/') . $imce['subdirectories'][0];
    $dirpath = $root . $dirname;

to this:

    $dirname = ($imce['dir'] == '.' ? '' : $imce['dir'] .'/');
    $dirpath = $root . $dirname;
    return TRUE;

And now my users can access all sub-folders and files within their %uid/ folder.

ufku’s picture

Category: bug » support
Status: Needs review » Active

Try changing Drupal's file directory path to its absolute form and make sure sub-directories you use are not symbolic links pointing to outside of Drupal's file directory.

alexromao’s picture

Having the same problem, subdirectories not showing.

I'm using ver. 6.2rc1.

Created directory with write and read permissions and still not visible by IMCE.
Tried absolute and relative path in the "File System" settings.

Will look into this when i can spare some time.

legolas’s picture

Thank you, ist works for me.

bradspry’s picture

Thank you very, very much cindyr!

firestonej’s picture

I'm having the same problem, but in d7x. The code fix doesn't apply. Can anyone point me in the right direction?

ufku’s picture

Status: Active » Closed (fixed)

Closing 6.x-1.x issues as this branch is no more supported.

AlexandreSantos’s picture

Thanks man, it is work for me in Drupal 6.20 with IMCE version 2.1

This code will not apply?

gusantor’s picture

hi, did you find any solution to this issue ?

I have set directory inside files/private folder, can create folders but can delete them because they dont appear in file list (I'm guessing one can select folder from there to delete it)

is it necesary other post linked to version I'm using, 7.x-1.4 ?

thanks in adnvace

johndieter’s picture

Version: 6.x-1.4 » 7.x-1.5
Priority: Normal » Critical
Status: Closed (fixed) » Active

IMCE seems to lock up as soon as I click on the subdiretory. (spinning circle icon to the left of the folder)
IMCE won't display (preview) any images in subdirectories (i.e. root/images/ads/* or /root/images/ads/calendarads) when selecting images using "browse server" from a subdirectory, strange class names get added: (i.e. img class="urhvqhquqohgefqjdytm" src="/sites/default/files/images/ads/DW.jpg" )
everything from files down are 777 and www-data grp and own
no .htaccess exist below files and the one in /files has:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

Google analytics module is completely removed.
IMCE 7.x-1.5
IMCE Wysiwyg API bridge 7.x-1.0

grep for urhvqhquqohgefqjdytm finds nothing.
Images in nodes from the subdirectories do not display either. Double clicking the image in the imce browser will bring the image up all by itself in the browser, just fine.

file_managed
image that doesn't work:
150 | 1 | DW.jpg | public://images/ads/DW.jpg | image/jpeg | 4548 |1 | 1325273413 | image |
image that does work:
| 136 | 7 | UofTulsa.jpg | public://images/UofTulsa.jpg | image/jpeg |10751 | 1 | 1320359040 | image |

NOTE: Just did a test, and uploaded DW.jpg to root/ads/DM.jpg - It STILL won't preview in IMCE, and won't insert properly or show up in nodes: the ckeditor browser inserts this:
img alt="" class="urhvqhquqohgefqjdytm urhvqhquqohgefqjdytm" src="/sites/default/files/ads/DW.jpg"

OMG! This is some kind of firefox problem! The exact same page browsed to with FF adds the class= crap, and the images don't work. With I.E. everything works fine. ????

FF: <h2>HGS Sponsors</h2><br><p><img class=" pdigrfmuvzfrdnmeqcrq" style="width: 126px; hei...
IE: <h2>HGS Sponsors</h2><br /><p><img style="WIDTH: 126px; HEIGHT: 96px" alt="" src="htt...
johndieter’s picture

Status: Active » Closed (works as designed)

This is caused by the adblock addin for firefox. Images with Ad in the name won't display.