First of all I love to see this module being taken seriously again. With the new dev releases (testing version 24 nov) I started testing again.

Trying to do some folder management I came across some errors.
(Creating new folders is no problem).

After moving a subfolder out of his parent or under a parent there is a warning and some stuff go wrong.
Renaming a folder gives the same error.

FileTransferException: @directory is outside of the @jail in FileTransfer->checkPath() (line 162 of /X/includes/filetransfer/filetransfer.inc).

The new folder is physically created, but the files don't move. Existing files in the moved folder stay in the original folder. The tree structure (taxonomy) is correctly updated though.
On renaming the folder isn't renamed physically.

Would be nice to see this fixed.

CommentFileSizeAuthor
#4 fix_folder_management-1352984-4.patch703 bytesdmsmidt

Comments

ParisLiakos’s picture

if you have public file storage then the jail is set to be to sites/default/
what is the source and destination mentioned by dblog.is it a directory out of the jail?

dmsmidt’s picture

The directory was made by MBP inside de sites/default/files folder.
So the dir is not out of the jail I guess..

dblog:
Location http://x/admin/content/media/folder/3/edit?destination=admin%2Fcontent%2Fmedia%2Ffolder_list&render=overlay&render=overlay
Referrer http://x/admin/content/media/folder/3/edit?destination=admin%2Fcontent%2Fmedia%2Ffolder_list&render=overlay
Message FileTransferException: @directory is outside of the @jail in FileTransfer->checkPath() (line 162 of SITEROOT/includes/filetransfer/filetransfer.inc).

(all folders permission: 777 for testing)

ParisLiakos’s picture

ah...dblog doesnt mention the directory...i wish @directory was an actual path to folder

Can you add this line:
watchdog('mbp', "Source is $source and destination $destination and jail $jail");

right after
$transfer = new FileTransferLocal($jail);
in media_browser_plus.module
and tell me what you get in dblog?

dmsmidt’s picture

StatusFileSize
new703 bytes

Here it is:

Source is /siteroot/sites/default/files/X and destination /siteroot/sites/default/files/media/X and jail /siteroot/public

Of course /siteroot/public is Not Oke, the rest seems fine to me.

This patch fixed it for me. Can you confirm?

ParisLiakos’s picture

Status: Active » Reviewed & tested by the community

yes...how the hell did this run in the first place.....
w/e lets get it commited

das-peter’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

deanflory’s picture

So, does this mean it doesn't work with the private file system?

Here's the error I'm getting after adding the path "private://folderwherefilesgohere" at /admin/config/media/media_browser_plus_settings:

FileTransferException: @directory is outside of the @jail in FileTransfer->checkPath() (line 162 of ../includes/filetransfer/filetransfer.inc).

The website encountered an unexpected error. Please try again later.
PathInfo: admin/config/media/media_browser_plus_settings is served by media_browser_plus_media_settings (form definition), implemented by media_browser_plus in ../sites/all/modules/media_browser_plus/media_browser_plus.module at line 1346

Also, why does submitting the admin form take me to the /admin/config page instead of looping back to itself upon completion/processing?

Using the latest 2.x dev version: 7.x-2.x-dev 2012-Oct-30

jmev’s picture

Issue summary: View changes

I'm wondering about the same thing as deanflory: will renaming of taxonomies and subsequent deleting of old matching directory not work when files are stored in private file system?