Flow permissions failure

Hallo,

I’ve installed flow and I’m trying to start the Quickstart tutorial, I’ve set a VirtualHost in the httpd.conf file which I think starts properly.

When I’m trying to connect to my VirtualHost I’m getting this error massage:

Flow could not create the directory “/var/www/html/…/flow3/test/Quickstart/Data/Temporary/Development/”. Please check the file permissions manually or run “sudo ./flow flow:core:setfilepermissions” to fix the problem. (Error #1441354578)

I ran that command already with my user instead of the"commandlineuser", the “webuser” and the “webgroup” are both “apache” (default in Fedora distribution). I also changed the group and the user of the /html/* folders to “apache” and used the command “chmod -R 775 html/”.

Any help will be appreciated.

Thanks a lot
Tal

do you know
chown -R apache:apache *
?

Do this only in the neos directory!!!

Thank you for our reply! Do you mean direct in the flow3 directory or in the Quickstart directory? Because I didn’t install anything called neos. I’ve used “chown -R apache:apache” on everything under the folder html so the folder flow3 with all its subfolders is already in apache:apache

okay. perhaps in the flow3 dir:
chown -R apache:apache *
./flow core:setfilepermissions root apache apache

Ok, the flow file is in the flow3/test/Quickstart directory, after I ran the commands from the Quickstart directory I got this output for the command ./flow core:setfilepermissions root apache apache

TYPO3 Flow File Permission Script

Checking permissions from here upwards.
Making sure Data and Web/_Resources exist.
Setting file permissions, trying to set ACLs via chmod …
Setting file permissions, trying to set ACLs via setfacl …
Done.

But I’m still getting the same permissions error

the only solution I found was to execute manually the chown/chmod commands at the end of the setfilepermissions.sh script…

My environment:
ubuntu 14.04.5 (trusty) on a vagrant box (ubuntu/trusty64), running under virtualbox.

By the way, I decided to rise the default ram size up to 1024MB, instead of increasing the swap space, in order to avoid the composer error while installing…

Hi @talgl,

did you find a solution in the meantime?
Because Flow needs to execute sub-commands currently and because it needs to write files, it needs the corresponding permissions.
Probably the best idea is to make sure that web server and CLI user share the same group so that you don’t create files/folders with the wrong permissions when on the bash.
I don’t think that this is exactly related to Flow.

I ran into the same problem, read everything I found (even the German posts :)) but still no luck. I’ve been running a development instance on my local computer for a while and I’m ready to make the move to a production Linux server.

I’m using a DreamHost DreamCompute cloud server. I’m not able to login as root nor su to root but I can do sudo commands. Let me tell you in advance that I’m not expert in Linux at all.

I have installed apache, PHP 7.0 and MariaDB already, they are working fine. I got past the composer part of the neos installation and I have a /var/www/html/neos directory with the proper content in it.

I’m at the setup step, I’m trying to access the server remotely by http://server.com/setup and I get the following error:
Flow could not create the directory
"/var/www/html/neos/Data/Temporary/Production/". Please check the file
permissions manually or run "sudo ./flow flow:core:setfilepermissions"
to fix the problem. (Error #1441354578)

I login as user ‘centos’ and apache is running as user apache:apache.

Yes I executed sudo ./flow core:setfilepermissions centos apache apache with no effect:
TYPO3 Flow File Permission Script

Checking permissions from here upwards.
Making sure Data and Web/_Resources exist.
Setting file permissions, trying to set ACLs via chmod ...
Setting file permissions, trying to set ACLs via setfacl ...
Done.

ls -al /var/www/html/neos returns:
drwxrwxrwx. 8 apache apache 4096 Dec 9 22:02 .
drwxr-xr-x. 3 apache apache 4096 Dec 10 02:24 …
drwxrwxrwx. 2 apache apache 4096 Dec 9 22:01 bin
drwxrwxrwx. 4 apache apache 4096 Dec 9 22:01 Build
-rwxrwxrwx. 1 apache apache 1837 Dec 9 22:02 composer.json
-rwxrwxrwx. 1 apache apache 149615 Dec 9 22:02 composer.lock
drwxrwxrwx+ 5 apache apache 4096 Dec 9 22:02 Configuration
drwxrwxrwx+ 5 apache apache 4096 Dec 9 22:03 Data
-rwxrwxrwx. 1 apache apache 427 Dec 9 22:02 flow
-rwxrwxrwx. 1 apache apache 270 Dec 9 22:02 flow.bat
-rwxrwxrwx. 1 apache apache 398 Dec 9 22:01 .gitignore
drwxrwxrwx+ 7 apache apache 4096 Dec 9 22:02 Packages
-rwxrwxrwx. 1 apache apache 708 Dec 9 22:02 Readme.rst
-rwxrwxrwx. 1 apache apache 2675 Dec 9 22:02 Upgrading.rst
drwxrwxrwx. 3 apache apache 4096 Dec 9 22:02 Web

since I gave all permissions to everything under neos to everyone to test it but it didn’t solve.

If I create the Production directory manually it will go past that step but then complains about another file being not writable.

Please help I’ve been struggling it whole day and I’m really out of ideas.

I just typed a novel, before anyone reads that I have a quick question, it may solve it…

You wrote “Probably the best idea is to make sure that web server and CLI user
share the same group so that you don’t create files/folders with the
wrong permissions when on the bash.”

By CLI user you mean the currently logged in user, in my case ‘centos’?
I executed
sudo usermod -a -G apache centos
so both centos and apache are in the apache groups. Is that you were suggesting?

One more piece of information:
I was able to manually create the Production directory under /var/www/html/neos/Data as both centos user (the logged in user) and apache user (as sudo -u apache mkdir Production).

I really have no idea what may be going on. Now I’m at the point that I’m rebuilding the whole server instance from scratch.

Sorry for the multiple posts but I keep finding new things as I’m thinking about it. Please see below and let me know if you have a suggestion or idea I should try.

So far I was trying to access /setup via apache, remotely.

I tried to run the server locally on port 8081 with ./flow server:run
It started up fine. I opened port 8081 but on my laptop when I tried to access /setup it remotely I got an “Unable to connect” error.

Unfortunately I don’t have a browser on my Linux server so I used curl http://127.0.0.1:8081/setup which returned a success page (after a bunch of css…):

 <div class="alert alert-success">
     <span class="glyphicon glyphicon-refresh glyphicon-spin"></span>
    We are now redirecting you to the setup. <b>This might take 10-60 seconds on the first run,</b> because the application needs to build up various caches.
</div>

and it actually created the folder under /Data/Temporary! For some reason it created Development instead of Production but let’s investigate that later.

So it looks like the permission problem only exists if neos is running via apache and it’s working fine if flow is ran via the command line.

I installed Lynx and was able to finish setup using that (fun fact the neos setup site was really easy to use in a text-only browser).
I was able to access the Admin UI via Lynx locally at 127.0.0.1:8081/neos so it was working.

Unfortunately when I tried it remotely from my laptop at domain.com/neos it still returned the Flow could not create the directory
"/var/www/html/neos/Data/Temporary/Production/". Please check the file
permissions manually or run "sudo ./flow flow:core:setfilepermissions"
to fix the problem. (Error #1441354578) error.

I’ve given up at this point. I’ll try to reinstall the server instance from scratch tonight but I don’t have high hopes for that.

Please help!

I have the same error.
Flow could not create the directory “/var/www/html/neos/Data/Temporary/Development/”. Please check the file permissions manually or run “sudo ./flow flow:core:setfilepermissions” to fix the problem. (Error #1441354578)

Did you do as the error tells you?
And what is your setup? Containers, local laptop or something else?

Yes I did, I was try with sudo ./flow flow:core:setfilepermissions root apache apache, but it doesn’t work. I have a CentOS 7, Linode 2GB: 1 CPU, 50GB Storage, 2GB RAM.
PHP 7.3

May be these links will help ?

https://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartII/Installation.html#file-permissions

https://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartV/CommandReference.html#neos-flow-core-setfilepermissions