[TYPO3-english] File and folder permission problems

bernd wilke t3ng at bernd-wilke.net
Thu Dec 13 17:11:46 CET 2012


Am 13.12.2012 16:43, schrieb Katja Lampela:
> Hi,
>
> TYPO3 4.7.5
> Plesk virtual hosting system (linux based)
>
> I get this error all the time after saving something:
> PHP Warning:
> rename(/var/www/vhosts/address.com/httpdocs/typo3temp/Cache/Data/t3lib_l10n/50c9f29c75968.temp,/var/www/vhosts/address.com/httpdocs/typo3temp/Cache/Data/t3lib_l10n/ff6543e530af7b951591efcd2060d7a5):
> No such file or directory in
> /var/www/vhosts/typo3_src-4.7.5/t3lib/cache/backend/class.t3lib_cache_backend_filebackend.php
> line 288
>
> Everything gets saved, but there is something wrong and I guess it is
> the folder permissions.
>
> The Plesk system works so that I have the webhosting space for a
> client/ftp-user, lets call this now "ftpuser" and TYPO3 installation is
> symlinked in its own directory (vhosts/address.com/httpdocs/) and the
> source is in vhosts directory.
>
> I have done as said in TYPO3 install guide:
> chown -R apache:apache <typo3_src-x.x.x>
> chown -R apache:apache <myfirsttypo3>
>
> I have tried so that the group is "ftpuser" and owner is apache or the
> other way around, but neither of them work. The only working thing is
> apache:apache. And this forces to use TYPO3 to all file uploads, ftp
> upload doesn't work to TYPO3 file folders. Not nice, but ok, I can live
> with that.
>
> For some reason I still get these errors. I think it is permission based
> according to this issue:
> http://forge.typo3.org/issues/39122
>
> And there is this advice:
>
> "You have to coordinate web server user and CLI user: if you can't use
> the same user for both they should be at least member of a common group.
> This group has to be set in $TYPO3_CONF_VARS['BE']['createGroup'] then."
>
> I don't quite get this, could some kind soul enlighten me?
>
en.wikipedia.org/wiki/Filesystem_permissions

a unix file can have only one owner and one ownergroup. these decide the 
rights a user has to this file (folders are like files).

for every file an user can be one of three accesses:
owner: the user is the owner and has the rights given by the first three 
bits of accessmask.

the user belongs to the same group than the file (a user can belong to 
multiple groups, he can selct one of his groups to create new files): 
the second three bits decide access

world/otherwise: the last three bits decide access



either you can manage to get the apache-user (=the user who runs the 
apache process) to be your FTP-user

or these two user have a common (first) group and your filemasks 
(apache/TYPO3 and FTP) are 664 / 775

or you need to set 666 / 777 (which is acceptable if you have your own 
server (eg. virtual machine)


for TYPO3 you can configure to use another owner, group, filemask in the 
install tool.
maybe your FTP-programm can set it also. (better solution: settings in 
user-configuration)

bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-english mailing list