Bug #53854
closedException if a directory in storage isn't readable
0%
Description
Exception message: "You are not allowed to access the given folder"
For example if the fileadmin is an own mount, it may be that a lost+found directory is created which is only accessible for root
Updated by Steffen Ritter almost 11 years ago
- Status changed from Accepted to Needs Feedback
Which "use case" are you talking about?
In general those exceptions are correct - in normal use cases they just should not be exposed to the UI
Updated by Stefan Froemken almost 11 years ago
I have the same error:
Backtrace:
6 TYPO3\CMS\Core\Resource\ResourceStorage::assureFolderReadPermission(TYPO3\CMS\Core\Resource\Folder)
typo3_src-6.2.0-2014-01-16/typo3/sysext/core/Classes/Resource/ResourceStorage.php:
01990: $data = $this->driver->getFolderInfoByIdentifier($identifier);
01991: $folder = ResourceFactory::getInstance()->createFolderObject($this, $data['identifier'], $data['name']);
01992: $this->assureFolderReadPermission($folder);
01993:
01994: return $folder;
5 TYPO3\CMS\Core\Resource\ResourceStorage::getFolder("/user_upload/")
typo3_src-6.2.0-2014-01-16/typo3/sysext/core/Classes/Resource/ResourceStorage.php:
01979: */
01980: public function getDefaultFolder() {
01981: return $this->getFolder($this->driver->getDefaultFolder());
01982: }
01983:
4 TYPO3\CMS\Core\Resource\ResourceStorage::getDefaultFolder()
Updated by Alexander Opitz almost 11 years ago
- Status changed from Needs Feedback to New
@Steffen
Not only that the Exception is viewed to the User, also the rest of reading files/folders stops.
Updated by Stefan Froemken almost 11 years ago
In ResourceStorage all rights for the redacteur are set to FALSE regardless if they are set in userGroup or not. I will move on with further debugging.
Stefan
Updated by Alexander Opitz almost 11 years ago
This issue haven't to do with the editor/user rights in TYPO3 backend. It has to do with the user/process access rights on the file system of the operation system.
Updated by Stefan Froemken almost 11 years ago
Oh dear. I think I have it. Have a look into:
$TCA['be_groups']['columns']['file_permissions']['config']['default'] = 'readFolder,writeFolder,addFolder,renameFolder,moveFolder,deleteFolder,readFile,writeFile,addFile,renameFile,moveFile,files_copy,deleteFile';
We have updated our TYPO3 4.7 to TYPO3 6.2 and these values are not set to be_user/be_group while update process. So for all users file_permissions is set to NULL. In combination with the default values from Storage where everything is FALSE it results FALSE for all rights, too.
I will set your defaults from TCA by SQL now, but I'm nearly sure that this is a problem in upgradeWizard.
Stefan
Updated by Stefan Froemken almost 11 years ago
OK...Permissions are correct now, but now the next step checks for isWithinFileMount. This method calls isFirstPartOfStr with:
$str = /user_upload
$partStr = /user_upload/
You should see that this can't work. $this->canonicalizeAndCheckFileIdentifier($identifier); removes the appended / and that's why this method fails.
Stefan
Updated by Stefan Froemken almost 11 years ago
I have added following to ResourceStorage in getFoldersInFolder:
foreach ($folderIdentifiers as $folderIdentifier) { try { $folders[$folderIdentifier] = $this->getFolder($folderIdentifier); } catch (Exception\InsufficientFolderAccessPermissionsException $e) { } }
The Element Browser works now, but I don't know if this change will break somewhere else.
Stefan
Updated by Gerrit Code Review almost 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/26905
Updated by Steffen Ritter almost 11 years ago
- Status changed from Under Review to Closed
Closed as duplicate of issue
http://forge.typo3.org/issues/51512