[TYPO3-english]  [TYPO3 6.2] backend files browsing error : You are not allowed to create directories in the folder "
    Jerome P 
    portal.j at hotmail.fr
       
    Tue Jul  8 14:00:11 CEST 2014
    
    
  
Hello everyone,
I have a really annoying error in the TYPO3 BE, that I get everytime I want to browse/list files of the TYPO3 installation.
The "Filelist" module page, as well as the window opened when I click a "browse" button (for browsing files only ; browsing pages/links is OK), are displaying the following TYPO3 error :
        Oops, an error occurred!
        You are not allowed to create directories in the folder "/"
        More information regarding this error might be available online.
        (online = http://wiki.typo3.org/Exception/CMS/1323059807)
It happened the first time during the 6.1 -> 6.2 upgrade wizard, at step "Migrate all RTE magic images from uploads/RTEmagicC_* to fileadmin/_migrated/RTE/". I suppose this step/wizard was still here because during 6.0 -> 6.1 there were some warnings remaining => some files weren't migrated, because they were not found : but these files didn't exist anymore, so it's not suprising...
But I was able to execute the next steps, update the database, etc...
The exception comes from file /typo3/sysext/core/Classes/Resource/ResourceStorage.php, line 2009 :
        public function createFolder($folderName, Folder $parentFolder = NULL) {
            if ($parentFolder === NULL) {
                $parentFolder = $this->getRootLevelFolder();
            } elseif (!$this->driver->folderExists($parentFolder->getIdentifier())) {
                throw new \InvalidArgumentException('Parent folder "' . $parentFolder->getIdentifier() . '" does not exist.', 1325689164);
            }
            if (!$this->checkFolderActionPermission('add', $parentFolder)) {
                throw new Exception\InsufficientFolderWritePermissionsException('You are not allowed to create directories in the folder "' . $parentFolder->getIdentifier() . '"', 1323059807);                // LINE 2009
            }
            // ...
        }
I then added a debug_print_backtrace() just before the throw, and in every situation that would throw the exception, the two first lines are the same :
        #0 TYPO3\CMS\Core\Resource\ResourceStorage->createFolder(_processed_) called at [/www/docs/typo3_src-6.2.3/typo3/sysext/core/Classes/Resource/ResourceStorage.php:2472]
        #1 TYPO3\CMS\Core\Resource\ResourceStorage->getProcessingFolder() called at [/www/docs/typo3_src-6.2.3/typo3/sysext/core/Classes/Resource/ResourceStorage.php:1929]
        (inside the "Filelist" module, for the left tab with file tree, the debug_print_backtrace() says that #1 is at ResourceStorage.php:1929, but for the main page of this module, it says that #1 is at ResourceStorage.php:2452)
        (about the error during the upgrade wizard, it says that #1 is at ResourceStorage.php:2070)
So I looked again inside the code, and here is getProcessingFolder() :
        public function getProcessingFolder() {
	        if (!isset($this->processingFolder)) {
		        $processingFolder = self::DEFAULT_ProcessingFolder;
		        if (!empty($this->storageRecord['processingfolder'])) {
			        $processingFolder = $this->storageRecord['processingfolder'];
		        }
		        if ($this->driver->folderExists($processingFolder) === FALSE) {
			        $this->processingFolder = $this->createFolder($processingFolder);
		        } else {
			        $data = $this->driver->getFolderInfoByIdentifier($processingFolder);
			        $this->processingFolder = ResourceFactory::getInstance()->createFolderObject($this, $data['identifier'], $data['name']);
		        }
	        }
	        return $this->processingFolder;
        }
Apparently, this function thinks that the default processing folder doesn't exist ; but that's not true, I have /fileadmin/_processed_/ and /typo3temp/_processed_/ folders !
After that, it obviously try to create the processing folder with createFolder(), without giving its parent folder.
So createFolder() call getRootLevelFolder() to know its path, and it seems that "/" is returned, the server root... obviously, the webserver doesn't have permissions to create files inside the root, and the checkFolderActionPermission() call fails.
Surprisingly, all these problems doesn't affect the t3quixplorer extension ; I can use the "Quixplorer" module in the BE without any errors, the file tree and all its content is listed, I can browse it.
Does any one have an idea of why this is happening ?
I've read on a quite similar problem (I think) on the forge that someone was saying it could be because of a bad merge of databases, and then the path wasn't relative anymore but absolute. I would be surprised if a bad merge happened, I didn't have any errors of that kind ; and about the path, even if it was that, I don't know how to fix it...
Thanks in advance !
    
    
More information about the TYPO3-english
mailing list