I have a setup, where the private file system path is "outside", relative to the public path:

public: domain.xx/files
private: domain.xx/private/files

Is there anyway I can configure IMCE, so it will be able to show files from both "roots"? Or how can I set the root to be "above" the /files library.

My default file configuration is public.



ufku’s picture

You can't set a root other than file system paths. You may access the files at separate urls like /imce/public, imce/private.
Creating symlinks could be a solution but Drupal does not support it currently.

mazaza’s picture

Would it be a viable support request "to make IMCE read from BOTH public and private path in admin/config/media/file-system" regardless of their path"

(And thereby not enforcing that private is a subdirectory of public)

stongo’s picture

I would like to second this feature request. The proper "secure" setup of the private file system is to have it outside the web root, and with the current configuration pages of imce, this is impossible.
It might make sense to use the stream wrapper changes introduced in Drupal 7, and reference the file systems like:

jlongbottom’s picture

I second this. It is currently impossible to have a proper public/private file system with IMCE being configured to access both. I am quite surprised this has not been an issue for many other people. What does everyone else do?

Cottser’s picture

Having this same issue, closed #1700438: Why force IMCE to use default file system? as a duplicate of this issue.

dbthorburn’s picture

Also wanting to see this resolved as it is very annoying to use ftp to upload files to a public dir

RobKoberg’s picture

me too. I want to have some files in the private file system (published book PDFs) and some in public (content images and videos).

I am going to need to switch to media and give that a try... ufff

Nicolas Bouteille’s picture

Priority:Normal» Major

I also think this is a must.
How about making two different file explorers available ? Being two buttons in CKEditor or two tabs inside IMCE file explorer...
One public, that would display folders of the public root only and format urls that way: "sites/default/files/..."
One private, that would display folders of the private root only and format urls that way: "system/files/..." so that we can apply restrictions with other modules such as File Entity Permissions.

jelo’s picture

I second #3. Currently trying to set up a site with private files and running into this issue...

deanflory’s picture

Needing this too, didn't realize till now that I couldn't get into my public and private folders using IMCE and User-1. Hrrmmmmm....

leahtard’s picture

Issue summary:View changes

For others coming across this issue, IMCE now has a setting at /admin/config/media/imce. Expand "Common Settings" and uncheck "Disable serving of private files".

seattlehimay’s picture

Version:7.x-1.5» 7.x-1.9

I'm running into this issue as well. My content admin should be able to upload files to either public or private space, but can't do this.

lokapujya’s picture

"Disable serving of private files" allows you to basically have public files within the private files folder, but does not allow you to browse/upload files in the "public" folder.

bart atlas’s picture

"Disable serving of private files" obliterates file permissions. I have a site that uses OG to control access to nodes, and the nodes have files attached. File permissions work as they should, until I "disable serving of private files". Once I do that, every private file is available for download by anyone, anonymous or authenticated, who has the URI to the file. This checkbox is not a workable solution if you need to enforce access control.

See https://www.drupal.org/node/1174782 for related comments.

Christian DeLoach’s picture

"Disable serving of private files" option does not related to the original posters request so I'd like to get this discussion back on topic.

"Working with files in Drupal 7" (https://www.drupal.org/documentation/modules/file) recommends choosing a directory located outside of the web root for private files, for example:

However, the IMCE directory configurations are based on the "file system root" which I assume refers to the public file system path when the default download method is set to "Public local files served by the webserver" (see admin/config/media/file-system) so, currently, the only way to upload files to the private file directory defined by the private file system path (see admin/config/media/file-system) is if the private file directory is a descendant of the public file directory.

As the original poster requested and several others reiterated, it would be nice if there was a way of uploading files to the private file directory when the private file directory resides outside of the file system root.