diff --git a/src/main/java/org/olat/course/nodes/bc/BCCourseNodeEditController.java b/src/main/java/org/olat/course/nodes/bc/BCCourseNodeEditController.java
index 3d1fb343e1c2c364c7d389bebf9aa56bcd120fb1..d04a2ffdd1a19f03ae3a819234f8d5ff3b0465ca 100644
--- a/src/main/java/org/olat/course/nodes/bc/BCCourseNodeEditController.java
+++ b/src/main/java/org/olat/course/nodes/bc/BCCourseNodeEditController.java
@@ -27,6 +27,7 @@ package org.olat.course.nodes.bc;
 
 import org.olat.admin.quota.QuotaConstants;
 import org.olat.core.commons.modules.bc.FolderRunController;
+import org.olat.core.commons.modules.bc.vfs.OlatNamedContainerImpl;
 import org.olat.core.gui.UserRequest;
 import org.olat.core.gui.components.Component;
 import org.olat.core.gui.components.link.Link;
@@ -45,6 +46,7 @@ import org.olat.core.util.vfs.VFSContainer;
 import org.olat.core.util.vfs.VFSItem;
 import org.olat.core.util.vfs.VFSManager;
 import org.olat.core.util.vfs.callbacks.FullAccessWithQuotaCallback;
+import org.olat.core.util.vfs.callbacks.ReadOnlyCallback;
 import org.olat.core.util.vfs.callbacks.VFSSecurityCallback;
 import org.olat.course.ICourse;
 import org.olat.course.assessment.AssessmentHelper;
@@ -54,6 +56,7 @@ import org.olat.course.config.CourseConfig;
 import org.olat.course.editor.NodeEditController;
 import org.olat.course.nodes.BCCourseNode;
 import org.olat.course.run.userview.UserCourseEnvironment;
+import org.springframework.beans.factory.annotation.Autowired;
 
 /**
  * Initial Date: Apr 28, 2004
@@ -73,14 +76,19 @@ public class BCCourseNodeEditController extends ActivateableTabbableDefaultContr
 
 	private ICourse course;
 	private BCCourseNode bcNode;
+	
+	private Link vfButton;
+	private TabbedPane myTabbedPane;
 	private VelocityContainer accessabiliryContent, folderContent;
 
-	private ConditionEditController uploaderCondContr, downloaderCondContr;
-	private Controller quotaContr;
-	private TabbedPane myTabbedPane;
-	private Link vfButton;
+	private CloseableModalController cmc;
+	private FolderRunController folderCtrl;
 	private BCCourseNodeEditForm folderPathChoose;
-	private VFSContainer target;
+	private ConditionEditController uploaderCondContr, downloaderCondContr;
+	
+	
+	@Autowired
+	private QuotaManager quotaManager;
 
 	/**
 	 * Constructor for a folder course building block editor controller
@@ -136,36 +144,66 @@ public class BCCourseNodeEditController extends ActivateableTabbableDefaultContr
 	 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 	 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
 	 */
+	@Override
 	public void event(UserRequest ureq, Component source, Event event) {
 		if (source == vfButton){
-			if(bcNode.getModuleConfiguration().getBooleanSafe(CONFIG_AUTO_FOLDER)){
-				target = BCCourseNode.getNodeFolderContainer(bcNode, course.getCourseEnvironment());
-			}else{
-				String path = bcNode.getModuleConfiguration().getStringValue(CONFIG_SUBPATH, "");
-				VFSItem pathItem = course.getCourseFolderContainer().resolve(path);
-				if(pathItem instanceof VFSContainer){
-					target = (VFSContainer) pathItem;
+			doOpenFolder(ureq);
+		}
+	}
+	
+	private void doOpenFolder(UserRequest ureq) {
+		VFSContainer namedContainer = null;
+		if(bcNode.getModuleConfiguration().getBooleanSafe(CONFIG_AUTO_FOLDER)){
+			OlatNamedContainerImpl directory = BCCourseNode.getNodeFolderContainer(bcNode, course.getCourseEnvironment());
+			directory.setLocalSecurityCallback(getSecurityCallbackWithQuota(directory.getRelPath()));
+			namedContainer = directory;
+		} else {
+			VFSContainer courseContainer = course.getCourseFolderContainer();
+			String path = bcNode.getModuleConfiguration().getStringValue(CONFIG_SUBPATH, "");
+			VFSItem pathItem = courseContainer.resolve(path);
+			if(pathItem instanceof VFSContainer){
+				namedContainer = (VFSContainer) pathItem;
+				if(bcNode.isSharedFolder()) {
+					if(course.getCourseConfig().isSharedFolderReadOnlyMount()) {
+						namedContainer.setLocalSecurityCallback(new ReadOnlyCallback());
+					} else {
+						String relPath = BCCourseNode.getNodeFolderContainer(bcNode, course.getCourseEnvironment()).getRelPath();
+						namedContainer.setLocalSecurityCallback(getSecurityCallbackWithQuota(relPath));
+					}
+				} else {
+					VFSContainer inheritingContainer = VFSManager.findInheritingSecurityCallbackContainer(namedContainer);
+					if (inheritingContainer != null && inheritingContainer.getLocalSecurityCallback() != null
+							&& inheritingContainer.getLocalSecurityCallback() .getQuota() != null) {
+						Quota quota = inheritingContainer.getLocalSecurityCallback().getQuota();
+						namedContainer.setLocalSecurityCallback(new FullAccessWithQuotaCallback(quota));
+					} else {
+						namedContainer.setLocalSecurityCallback(new ReadOnlyCallback());
+					}
 				}
 			}
-			VFSContainer namedContainer = target;
-			Quota quota = QuotaManager.getInstance().getCustomQuota(VFSManager.getRealPath(namedContainer));
-			if (quota == null) {
-				Quota defQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
-				quota = QuotaManager.getInstance().createQuota(VFSManager.getRealPath(namedContainer), defQuota.getQuotaKB(), defQuota.getUlLimitKB());
-			}
-			VFSSecurityCallback secCallback = new FullAccessWithQuotaCallback(quota);
-			namedContainer.setLocalSecurityCallback(secCallback);
-			CloseableModalController cmc = new CloseableModalController(getWindowControl(), translate("close"),
-					new FolderRunController(namedContainer, false, ureq, getWindowControl()).getInitialComponent());
-			cmc.activate();
-			return;
 		}
+		
+		folderCtrl = new FolderRunController(namedContainer, false, ureq, getWindowControl());
+		listenTo(folderCtrl);
+		cmc = new CloseableModalController(getWindowControl(), translate("close"), folderCtrl.getInitialComponent());
+		listenTo(cmc);
+		cmc.activate();
+	}
+	
+	private VFSSecurityCallback getSecurityCallbackWithQuota(String relPath) {
+		Quota quota = quotaManager.getCustomQuota(relPath);
+		if (quota == null) {
+			Quota defQuota = QuotaManager.getInstance().getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
+			quota = QuotaManager.getInstance().createQuota(relPath, defQuota.getQuotaKB(), defQuota.getUlLimitKB());
+		}
+		return new FullAccessWithQuotaCallback(quota);
 	}
 
 	/**
 	 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 	 *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
 	 */
+	@Override
 	public void event(UserRequest urequest, Controller source, Event event) {
 		if (source == uploaderCondContr) {
 			if (event == Event.CHANGED_EVENT) {
@@ -179,43 +217,47 @@ public class BCCourseNodeEditController extends ActivateableTabbableDefaultContr
 				bcNode.setPreConditionDownloaders(cond);
 				fireEvent(urequest, NodeEditController.NODECONFIG_CHANGED_EVENT);
 			}
-		}
-		if (source == folderPathChoose){
+		} else if (source == folderPathChoose){
 			if(bcNode.getModuleConfiguration().getStringValue(CONFIG_SUBPATH, "").startsWith("/_sharedfolder")){
 				accessabiliryContent.contextPut("uploadable", false);
-			}else{
+			} else {
 				accessabiliryContent.contextPut("uploadable", true);
 			}
 			fireEvent(urequest, event);
+		} else if(cmc == source) {
+			cleanUp();
 		}
 	}
+	
+	private void cleanUp() {
+		removeAsListenerAndDispose(folderCtrl);
+		removeAsListenerAndDispose(cmc);
+		folderCtrl = null;
+		cmc = null;
+	}
 
 	/**
 	 * @see org.olat.core.gui.control.generic.tabbable.TabbableDefaultController#addTabs(org.olat.core.gui.components.TabbedPane)
 	 */
+	@Override
 	public void addTabs(TabbedPane tabbedPane) {
 		myTabbedPane = tabbedPane;
 		tabbedPane.addTab(translate(PANE_TAB_ACCESSIBILITY), accessabiliryContent);
 		tabbedPane.addTab(translate(PANE_TAB_FOLDER), folderContent);
 	}
 
-	/**
-	 * @see org.olat.core.gui.control.DefaultController#doDispose(boolean)
-	 */
+	@Override
 	protected void doDispose() {
-    //child controllers registered with listenTo() get disposed in BasicController
-		if (quotaContr != null) {
-			quotaContr.dispose();
-			quotaContr = null;
-		}
+		//
 	}
-	
+
+	@Override
 	public String[] getPaneKeys() {
 		return paneKeys;
 	}
 
+	@Override
 	public TabbedPane getTabbedPane() {
 		return myTabbedPane;
 	}
-
 }
\ No newline at end of file
diff --git a/src/main/java/org/olat/course/nodes/bc/BCCourseNodeRunController.java b/src/main/java/org/olat/course/nodes/bc/BCCourseNodeRunController.java
index 81b05a4fb7704be1d435a0ed5d54884d26e3b306..4493b9406a504e3e2c09e1b77608a37c5043d93c 100644
--- a/src/main/java/org/olat/course/nodes/bc/BCCourseNodeRunController.java
+++ b/src/main/java/org/olat/course/nodes/bc/BCCourseNodeRunController.java
@@ -47,6 +47,7 @@ import org.olat.core.util.vfs.NamedContainerImpl;
 import org.olat.core.util.vfs.VFSContainer;
 import org.olat.core.util.vfs.VFSItem;
 import org.olat.core.util.vfs.VFSManager;
+import org.olat.core.util.vfs.callbacks.ReadOnlyCallback;
 import org.olat.core.util.vfs.callbacks.VFSSecurityCallback;
 import org.olat.course.CourseFactory;
 import org.olat.course.CourseModule;
@@ -95,10 +96,10 @@ public class BCCourseNodeRunController extends DefaultController implements Acti
 		boolean noFolder = false;
 		VFSContainer target = null;
 		VFSSecurityCallback scallback;
-		if(courseNode.getModuleConfiguration().getBooleanSafe(BCCourseNodeEditController.CONFIG_AUTO_FOLDER)){
-			target = BCCourseNode.getNodeFolderContainer(courseNode, courseEnv);
-			scallback = new FolderNodeCallback(BCCourseNode.getNodeFolderContainer(courseNode, courseEnv).getRelPath(), ne, isOlatAdmin, isGuestOnly, nodefolderSubContext);
-
+		if(courseNode.getModuleConfiguration().getBooleanSafe(BCCourseNodeEditController.CONFIG_AUTO_FOLDER)) {
+			OlatNamedContainerImpl directory = BCCourseNode.getNodeFolderContainer(courseNode, courseEnv);
+			scallback = new FolderNodeCallback(directory.getRelPath(), ne, isOlatAdmin, isGuestOnly, nodefolderSubContext);
+			target = directory;
 		} else if(courseNode.isSharedFolder()) {
 			String subpath = courseNode.getModuleConfiguration().getStringValue(BCCourseNodeEditController.CONFIG_SUBPATH, "");
 			VFSItem item = courseEnv.getCourseFolderContainer().resolve(subpath);
@@ -112,22 +113,34 @@ public class BCCourseNodeRunController extends DefaultController implements Acti
 			if(courseEnv.getCourseConfig().isSharedFolderReadOnlyMount()) {
 				scallback = new FolderNodeReadOnlyCallback(nodefolderSubContext);
 			} else {
-				scallback = new FolderNodeCallback(BCCourseNode.getNodeFolderContainer(courseNode, courseEnv).getRelPath(), ne, isOlatAdmin, isGuestOnly, nodefolderSubContext);
+				String relPath = BCCourseNode.getNodeFolderContainer(courseNode, courseEnv).getRelPath();
+				scallback = new FolderNodeCallback(relPath, ne, isOlatAdmin, isGuestOnly, nodefolderSubContext);
 			}
 		} else{
 			//create folder automatically if not found
 			String subPath = courseNode.getModuleConfiguration().getStringValue(BCCourseNodeEditController.CONFIG_SUBPATH);
 			VFSContainer item = VFSManager.resolveOrCreateContainerFromPath(courseEnv.getCourseFolderContainer(), subPath);
-			if(item == null){
+			
+			String relPath;
+			if(item == null) {
 				noFolder = true;
 				BCCourseNodeNoFolderForm noFolderForm = new BCCourseNodeNoFolderForm(ureq, getWindowControl());
 				setInitialComponent(noFolderForm.getInitialComponent());
+				scallback = new ReadOnlyCallback();
 			} else {
 				target = new NamedContainerImpl(courseNode.getShortTitle(), item);
+				
+				VFSContainer inheritingContainer = VFSManager.findInheritingSecurityCallbackContainer(target);
+				if (inheritingContainer != null && inheritingContainer.getLocalSecurityCallback() != null
+						&& inheritingContainer.getLocalSecurityCallback() .getQuota() != null) {
+					relPath = inheritingContainer.getLocalSecurityCallback().getQuota().getPath();
+				} else {
+					relPath = VFSManager.getRelativeItemPath(target, courseEnv.getCourseFolderContainer(), null);
+				}
+				scallback = new FolderNodeCallback(relPath, ne, isOlatAdmin, isGuestOnly, nodefolderSubContext);
 			}
-
-			scallback = new FolderNodeCallback(VFSManager.getRelativeItemPath(target, courseEnv.getCourseFolderContainer(), null), ne, isOlatAdmin, isGuestOnly, nodefolderSubContext);
 		}
+		
 		//course is read only, override the security callback
 		if(userCourseEnv.isCourseReadOnly()) {
 			scallback = new FolderNodeReadOnlyCallback(nodefolderSubContext);
diff --git a/src/main/java/org/olat/course/nodes/bc/FolderNodeCallback.java b/src/main/java/org/olat/course/nodes/bc/FolderNodeCallback.java
index 65e8d7b6246a27d5b3c832b8b114fae8173fc5b8..134c9852365ec5cd19471f9aed85165d967bb830 100644
--- a/src/main/java/org/olat/course/nodes/bc/FolderNodeCallback.java
+++ b/src/main/java/org/olat/course/nodes/bc/FolderNodeCallback.java
@@ -62,7 +62,7 @@ public class FolderNodeCallback implements VFSSecurityCallback {
 		nodeFolderQuota = qm.getCustomQuota(relPath);
 		if (nodeFolderQuota == null) {
 			Quota defQuota = qm.getDefaultQuota(QuotaConstants.IDENTIFIER_DEFAULT_NODES);
-			nodeFolderQuota = QuotaManager.getInstance().createQuota(relPath, defQuota.getQuotaKB(), defQuota.getUlLimitKB());
+			nodeFolderQuota = qm.createQuota(relPath, defQuota.getQuotaKB(), defQuota.getUlLimitKB());
 		}
 	}