Bug #53037

Install Tool: Folder structure is too strict

Added by Michael Stucki almost 2 years ago. Updated 10 months ago.

Status:Closed Start date:2013-10-22
Priority:Must have Due date:
Assigned To:- % Done:

0%

Category:Install Tool Spent time: -
Target version:6.2.0
TYPO3 Version:6.2 Is Regression:No
PHP Version:5.3 Sprint Focus:
Complexity:

Description

The "folder structure" module of the install tool is a good help to create a missing structure. However, in our case, it confuses admins because it lacks flexibility.

The problem is that the tool reports it as an error that the root folder (/) is not a directory. That is true because in our environment, it's a symlink which points to a subfolder of the main project (../site/www). Of course this is a special structure of our hosting environment, but in previous versions, it has always worked. It even works in master even though the Install Tool reports it as an error...

Suggestion:
  • The root folder should be allowed to be a symbolic link OR a folder.
  • It's not the case for us, but I can also imagine people who would like to have "typo3_src" to be a folder, not a symlink.

Related issues

related to Core - Bug #52578: Install process removes permission Resolved 2013-10-07
related to Core - Task #52668: Install Tool: Remove permission checking and fixing code ... Resolved 2014-03-26
related to Core - Task #52669: Install Tool: Lower severity of sym-link check to "Warning" Closed 2013-10-10
related to Core - Feature #61642: Allow overriding the directory structure Rejected 2014-09-16
related to Core - Bug #53298: Installer - file and folder permissions detection Closed 2013-11-04
related to Core - Bug #52993: index.php in DOC_ROOT must be symlinked Accepted 2013-10-21
duplicated by Core - Bug #54346: Install tool: "/ is not a directory" Closed 2013-12-11

History

#1 Updated by Lorenz Ulrich almost 2 years ago

I agree. I guess this folder structure is required for the new Core updater? If so, it would be better to display a warning that with the current folder structure, updates from the Install Tool won't be possible.

#2 Updated by Philipp Gampe almost 2 years ago

  • Status changed from New to Accepted

We will lover the severity. The folder structure is required for the core updater. However the core updater will not offer an update if the folder structure does not match.

Therefore, we just need to display a warning (or even just a notice) if the folder structure does not match the core model.

Someone up to make a patch? http://wiki.typo3.org/CWT

#3 Updated by Markus Klein over 1 year ago

  • Priority changed from Should have to Must have
  • Target version set to 6.2.0

@Ernesto, @Christian: I used this issue to link all related reports

#4 Updated by Michael Stucki over 1 year ago

Looking at the code, I really wonder why the folder structure was moved into an object. Creating nodes for links, files & folders is far beyond any practical use cases.
IMHO there's almost nothing which is as static as the folder structure of TYPO3 websites, so why create all that overhead?

Think about it. My suggestion is to simplify the functionality. Don't be strict about symlinks vs. folders. And always keep the practical usefulness in mind.

#5 Updated by Helmut Hummel over 1 year ago

Michael Stucki wrote:

Looking at the code, I really wonder why the folder structure was moved into an object. Creating nodes for links, files & folders is far beyond any practical use cases.

encapsulating behavior in objects is not "far beyond" at all

IMHO there's almost nothing which is as static as the folder structure of TYPO3 websites, so why create all that overhead?

OO Code most of the time (always?) is overhead. That does not mean that it is bad.

Think about it. My suggestion is to simplify the functionality. Don't be strict about symlinks vs. folders.

Simplifying is something different than flexibility.

And always keep the practical usefulness in mind.

The code has been written with automatic upgrade in mind. Supporting every possible link/ folder structure in an update case is close to impossible.
Thus there must be one default structure that supports an automatic update in the install tool.
The folder structure is only "enforced" for this case and during install (and auto update is disabled if current structure does not match the expected one)

Having all that in mind, please make a practical suggestion what you actually want to see changed.

(Maybe implementing #52669 would already do the job do and would be very easy thanks to a clean code structure.)

#6 Updated by Franz Holzinger over 1 year ago

I get some recommendations:

These files or folders have errors and may be automatically fixable:
Path /index.php is not a link
The target /index.php should be a link, but is of type file. This can not be fixed. Please investigate.

Path /typo3 is not a link
The target /typo3 should be a link, but is of type dir. This can not be fixed. Please investigate.

/typo3_src should be a link, but it does not exist
Links can not be fixed by this system

However symbolic links cannot be made on this installation. I do not have ssh access. The folders should work fine. No symbolic links are necessary at all.
But the Install Tool marks these lines red as errors.

#7 Updated by Ernesto Baschny over 1 year ago

  • Status changed from Accepted to Closed

This was fixed in #52668. New defaults are 0664 and 2775.

#8 Updated by Thomas Candrian 10 months ago

Not completely fixed, I still receive:

/ is not a directory
Directory / should be a directory, but is of type link

#9 Updated by Franz Holzinger 10 months ago

This warning comes with the installation of TYPO3 6.2.5:

/index.php is a link, but link target is not as specified
Link target should be typo3_src/index.php but is typo3/index.php

My root folder has these files:

-rwxrwxrwx 1 ttboard ttboard    0 Okt  7 10:31 FIRST_INSTALL
lrwxrwxrwx 1 ttboard ttboard   15 Okt  7 10:33 index.php -> typo3/index.php
lrwxrwxrwx 1 ttboard ttboard   15 Okt  6 22:05 typo3 -> typo3_src/typo3
lrwxrwxrwx 1 ttboard ttboard   15 Okt  6 22:04 typo3_src -> typo3_src-6.2.5
drwxrwxrwx 3 ttboard ttboard 4096 Sep 23 15:33 typo3_src-6.2.5

It should allow the link to typo3/index.php.

#10 Updated by Michael Stucki 10 months ago

In your case, the warning seems to be correct. typo3/index.php is not the same as typo3_src/index.php. In fact, you are now pointing to typo3_src/typo3/index.php.
Just ignore the warning and see what happens.

Franz Holzinger wrote:

This warning comes with the installation of TYPO3 6.2.5:

[...]

My root folder has these files:

[...]

It should allow the link to typo3/index.php.

#11 Updated by Alexander Opitz 10 months ago

Double linking isn't resolved yet.

Please open a new issue as feature if this is really needed and write in how this should be handled by the Core Updater.

#12 Updated by Franz Holzinger 10 months ago

There are indeed two different index.php files.

# ls -l    typo3/index.php
-rwxrwxrwx 1 ttboard ttboard 2196 Sep 23 15:33 typo3/index.php
# ls -l  typo3_src/index.php 
-rwxrwxrwx 1 ttboard ttboard 921 Sep 23 15:33 typo3_src/index.php

This means that the link "typo3/index.php" must be forbidden.

Then this issue could have the wrong link as the reason:

https://forge.typo3.org/issues/62074#change-232152

#13 Updated by Alexander Opitz 10 months ago

See #62074 for an answer to your issue.

Also available in: Atom PDF