[Typo3-dev] Suggestion for mounting user home directories

Marco Geweke mediamarco at web.de
Tue Oct 28 17:12:35 CET 2003


Hi,

we wanted to offer our users a secure and comfortable way to upload 
files to their typo3 home directory. So we set up a little chroot 
environment and a shell for secure copy for every user we have.
Now we had a secure way to transfer data, but the drawback was the 
little chroot-environment every user sees in his home dir when looking 
with typo3.
In every home, there is one folder for uploading files, all other data 
is read only, and the scp-shell automatically changes the directory to 
this upload-folder when connecting. So only one thing was left to do: 
Let typo3 use this upload folder inside the user's home when mounting.

Here are my little changes to make it happen ;)

/typo3conf/localconf.php:
---
$TYPO3_CONF_VARS["BE"]["userUploadDir"] = '/upload';
---

/t3lib/class.t3lib_userauthgroup.php from line 102 (3.5.0) or line 561 
(3.6.0-dev, 27102003):
---
// If userHomePath is set, we attempt to mount it
if ($GLOBALS["TYPO3_CONF_VARS"]["BE"]["userHomePath"])  {
	$didMount=$this->addFileMount($this->user["username"], "", 
$GLOBALS["TYPO3_CONF_VARS"]["BE"]["userHomePath"].$this->user["uid"]."_".$this->user["username"].$GLOBALS["TYPO3_CONF_VARS"]["BE"]["userUploadDir"], 
0, "user");
	if (!$didMount) { // If no user-dir with prepended name, then mount 
without.
		$this->addFileMount($this->user["username"], "", 
$GLOBALS["TYPO3_CONF_VARS"]["BE"]["userHomePath"].$this->user["uid"].$GLOBALS["TYPO3_CONF_VARS"]["BE"]["userUploadDir"], 
0, "user");
	}
}
---

Maybe this can go into the core, it doesn't change anything if you don't 
set "userUploadDir", but it gives a new option.

Greetings,
Marco Geweke





More information about the TYPO3-dev mailing list