Configurate Slim

Hi everybody.
I’m totally new with Slim.
I’ve installed in a server (Centos 7) where there is a Apache installed.
When I installed by composer I received a message that could not be as root.
So I changed to another user (aaugusto), as you can see:
[root@localhost aaugusto]# ll
total 16
drwxr-xr-x 2 root root 6 Out 19 13:00 api
-rw-rw-r–. 1 aaugusto aaugusto 55 Out 17 16:50 composer.json
-rw-rw-r–. 1 aaugusto aaugusto 10895 Out 17 16:51 composer.lock
drwxr-xr-x 3 aaugusto aaugusto 66 Out 18 13:49 nbproject
drwxr-xr-x. 2 root root 6 Out 18 10:42 teste
drwxrwxr-x. 8 aaugusto aaugusto 117 Out 19 13:12 vendor
[root@localhost aaugusto]#
But now I try to build my first test but doesn’t work.
Of course, the vendor folder is in another directory.
The Apache runs from /var/www/html.

How to solve this?

I also tried to install logging as aaugusto into the directory /var/www/html gives the error:"./composer.json is not writable." and doesn’t created the vendor folder.

Antonio

Here is what you need to do:

$ sudo chmod -R g+w /var/www/html
$ sudo groupadd webusers
$ sudo chgrp webusers -R /var/www/html
$ sudo chmod -R g+w /var/www/html
$ sudo gpasswd -a root webusers
$ sudo gpasswd -a apache webusers
$ gpasswd -a aaugusto webusers

This will help you keep appropriate permissions. Also don’t use root, use sudo if you need to run command as root.

Hope this helps

Hi Igor
Tks for the help, but the problem persist.

Try sudo chmod 0775 -R /var/www/html/composer.json
If it’s still doesn’t work try to restart and try again. If nothing works, try to temporary disabling selinux with sudo setinforce 0 and try it then.