?
avatar skurvish
skurvish
4 Jun 2020

Steps to reproduce the issue

I cloned the current repo to my ubuntu system. I switched to the 4.0-dev branch and ran composer install and npm-ce. All seemed OK. When I attempt to access the installation I get an immediate 500 error.

Using phpstorm I tracked this down to the file namespace.php at line 93 attempting to require /administrator/cache/autoload_psr4.php this file does not exist in my virgin installation.

Expected result

I should get the J! installation start page.

Actual result

System information (as much as possible)

Additional comments

avatar skurvish skurvish - open - 4 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Jun 2020
avatar richard67
richard67 - comment - 4 Jun 2020

@skurvish That file should be generated automatically. Maybe wrong permissions for folder /administrator/cache/? Or wrong user running the webserver? Does your webserver run on Windows or Linux?

avatar Mansaylon
Mansaylon - comment - 4 Jun 2020

No, I also checked. And it works with Joomla 3.x.
screen shot 2020-06-04 at 13 02 45


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar Mansaylon
Mansaylon - comment - 4 Jun 2020

And the System is based on Linux.
PHP is 7.4.5


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

@SharkyKZ Could you check that with PHP 7.4? I never had such problems with installation not starting because the autoloader file not being generated, and I'm also on Linux, just that I don't have PHP 7.4 (yet).

avatar skurvish
skurvish - comment - 4 Jun 2020

It appears to be a permission problem. On ubuntu cloning the repo as a normal user the directlry and file permissions are not set so:
drwxr-xr-x 11 joomla www-data 4096 Jun 4 07:23 ./
drwxr-xr-x 24 joomla www-data 4096 Jun 4 07:55 ../
drwxr-xr-x 2 joomla www-data 4096 Jun 4 07:20 cache/
drwxr-xr-x 37 joomla www-data 4096 Jun 4 07:23 components/
drwxr-xr-x 3 joomla www-data 4096 Jun 4 07:23 help/
drwxr-xr-x 2 joomla www-data 4096 Jun 4 07:23 includes/
-rw-r--r-- 1 joomla www-data 1064 Jun 4 07:23 index.php
drwxr-xr-x 4 joomla www-data 4096 Jun 4 07:20 language/
drwxr-xr-x 2 joomla www-data 4096 Jun 4 07:20 logs/
drwxr-xr-x 5 joomla www-data 4096 Jun 4 07:20 manifests/
drwxr-xr-x 25 joomla www-data 4096 Jun 4 07:23 modules/
drwxr-xr-x 4 joomla www-data 4096 Jun 4 07:23 templates/

which is 0755 per the documentation, but the joomla system seems not to be able to create the autoloader file. Changing the permissions to 0775 allows joomla to start. What should the permissions actually be in order for Joomla to start without a permission change when running from a git repo?

Also, shouldn't the process that is attempting to create this autoloader file throw an exception when it tries to create it? The exception that is being thrown is not very explanatory of what the real problem is.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar skurvish
skurvish - comment - 4 Jun 2020

I am running php 7.3.11 on Ubuntu 19.10


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

@skurvish How are the permissions for the parent folder of the Joomla root set? Maybe there is some sticky bit set? And how are your default permissions for creating new files? You can see those by using the umask command, see [e.g. https://geek-university.com/linux/set-the-default-permissions-for-newly-created-files/](e.g. https://geek-university.com/linux/set-the-default-permissions-for-newly-created-files/).

avatar richard67
richard67 - comment - 4 Jun 2020

Permissions should be 744 for folders and 644 for files, with a fex exceptions which are set to readonly by Joomla after an edit, like e.g. configuration.php. It is also important that user and group fit to user and group of the webserver, but this looks ok in the above listing.

avatar Mansaylon
Mansaylon - comment - 4 Jun 2020

I set the rights to 775 here before the post.
screen shot 2020-06-04 at 13 19 01

I have now also tested with PHP 7.3.17. Same result.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar skurvish
skurvish - comment - 4 Jun 2020

umask shows 0022. A newly created directory has permissions 0755 and a newly created file has 0644


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar Mansaylon
Mansaylon - comment - 4 Jun 2020

Sorry ... The attribute field is wrong ... the right of the tmp directory is shown correctly.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

@Mansaylon I am not talking about the rights you set for existing files, I am talking about the default permissions used for newly created files, which are shown and set by the umask command.

avatar skurvish
skurvish - comment - 4 Jun 2020

@Mansaylon it isn't clear to me, are you seeing the same issue as I am with a newly built Joomla from the repo?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

@skurvish What happens if you (temporarily for testing only) set permission of folders to 777?

avatar skurvish
skurvish - comment - 4 Jun 2020

If I set folders to 775 everything appears to work. I get the installation startup page. Haven't gone any further just yet but will be doing so shortly.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar Mansaylon
Mansaylon - comment - 4 Jun 2020

Same with 777.
But stop now.... I will rebuilt the installation.
Delete everything and reinstall.

I'll get back to you later. ;)

Thanks


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

@skurvish I guess you meant "777" in your previous post?

If yes, are you running Apache as webserver?

If yes, check if it is running with the right user and group by checking following entries in your apache config file:

User joomla
Group www-data

(if your user and group is same as in your listing)

avatar skurvish
skurvish - comment - 4 Jun 2020

I am able to complete the installation using 0775 permissions on the directories. Not sure what this says about installing from the repo though. Are other permissions required to be set post clone? Or should the repo have the correct permissions post clone?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

The permissions in the CMS repo are correct. If they are also correct on your local clone depends on your local OS setting, like I said, default permissions for files and folders and for the parent folder of the clone.

avatar skurvish
skurvish - comment - 4 Jun 2020

@richard67 Apache2 user and group are both www-data. The user joomla has group rights to www-data


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

@skurvish So would you say your issue here is solved? If yes, close it please or ping me here then I can close it for you.

@Mansaylon If you still have issues different to that one, please open a new issue. If group is always set right (a sticky bit for the webserver root or the joomla root so that the folder has permission "drwxrwsr-x" could help to make sure that the group is always right), then there should not be a problem when having 755 for folders and 644 for files.

avatar skurvish
skurvish - comment - 4 Jun 2020

@richard67 Well, not sure if I would say it was resolved or not just yet.I would like to confirm why the clone is not working from a fresh clone.

When I clone the repo the permissions on the joomla-cms directory are 755 and the ownership is joomla:www-data.

So my question is, do I have a base configuration issue with apache2 or through my umask that cause the installation to fail?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

@skurvish Well you have issues with git clone or with apache or with your local filesystem, and sure they are maybe not solved yet. But they are not Joomla core issues.

Google is your friend: Just look up "git clone linux folder permissions" and see what happens.

avatar Mansaylon
Mansaylon - comment - 4 Jun 2020

Unfortunately I have no direct access to the server. It is web hosting.
I have just given a ticket to the hoster.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67
richard67 - comment - 4 Jun 2020

@Mansaylon So your issue is not a Joomla core issue, right?

avatar Mansaylon
Mansaylon - comment - 4 Jun 2020

This I will check now


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar skurvish
skurvish - comment - 4 Jun 2020

OK, so I was able to perform a fresh clone and was successful in going through the installation procedure. What I had to do was change the apache2 user to (in my case) joomla.

Normally the ownership of the joomla directory tree should be www-data:www-data. When cloning the repo the user ownership is set to the user who performed the clone. For most people it makes sense to change the clone ownership to www-data:www-data.

I have a particular reason for wanting the user ownership to be something other than www-data and that is what was causing the original error.

I think though that the exception being thrown should be thrown at the point the file is attempting to be created rather than significantly further along the execution chain where the exception doesn't really help one determine what the problem is. But as I am now working I will not pursue this but the developers might consider pursuing yourselves.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar skurvish
skurvish - comment - 4 Jun 2020

I don't see how to close this in the tracker. Where do I find this?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/29424.

avatar richard67 richard67 - change - 4 Jun 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-06-04 14:42:06
Closed_By richard67
avatar richard67
richard67 - comment - 4 Jun 2020

@skurvish In the tracker you edit the item and change status to closed. or you go to GitHub and use the button at the bottom. Or you ask someone like me to do it ;-) I do it for you now.

Thanks for testing Joomla and reporting issues, even if this time it was not a core issue. But maybe next time you catch one, and that will be a help.

avatar richard67 richard67 - close - 4 Jun 2020
avatar richard67
richard67 - comment - 4 Jun 2020

Closed as not a Joomla core issue. Feel free to reopen it if it turns out that this is wrong.

Add a Comment

Login with GitHub to post a comment