So a prior question led me to this, I am trying to use Magento2, (very frustrating)
I have a VPS, with all the proper things for Magento2 to run.
I can install it but have huge permissions issues, because the part of the documentation I cannot understand is the part about Put the Magento file system owner in the web server's group
when I do: [~]# egrep -i '^user|^group' /etc/httpd/conf/httpd.conf
I get:
User nobody
Group nobody
UserDir
public_html
UserDir
disabled
UserDir disabled
and I don't know how to proceed from here.
Any help would be appreciated.
UPDATE### I have now completely started over... I wiped the host account clean and created a new one, starting from scratch, trying to follow the install directions from magento. everything is good up until the point where I have to: Put the Magento file system owner in the web server's group - I'm stuck there, since my user and group are both "nobody" I don't know what to do next, is says to do this THEN install magento... so I'm just stuck here now.
2 Answers 2
This command egrep -i '^user|^group' /etc/httpd/conf/httpd.conf is to help you to grab apache user and group automatically. But you can do it also manually:
Try to open your httpd.conf (using some editor, for example vim).
And find this strings:
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User www
Group www
In this particular case my Apache user is www and Apache group is www.
Also from output of your command I can see that your apache user and group is nobody so you can proceed starting from http://devdocs.magento.com/guides/v2.0/install-gde/prereq/apache-user.html#install-update-depend-user-add2group (just keep in mind that you need to use user and group nobody instead apache)
If you have any questions or need more details - just let me know. Thank you.
**1. Find the Primary / web Server group **
normally webserver user can be found with root login in SSH or terminal, to understand users and groups I found these articles helpful. https://www.linode.com/docs/tools-reference/linux-users-and-groups/ and https://www.tecmint.com/manage-users-and-groups-in-linux/
egrep -i '^user|^group' /etc/httpd/conf/httpd.conf
on Centos will show user as "apache" on Ubuntu will show user ad "www-data"
you can change the user name in httpd.conf file
2. Create a new "magento_user"and put "magento_user" in webserver primary group
usermod -g apache magento_user
-g for primary group -G for additional secondary group
check groups
groups magento_user
Logout of ssh/terminal and
login back
restart apache server to take effect.
hope this helps
Explore related questions
See similar questions with these tags.
Group nobodyshows that you server run with groupnobodysudo chown -R :nobody *from magento root