Magneto directory / file ownership, and becoming the apache user

Keith Smith techlists at phpcoderusa.com
Wed Jan 25 17:46:02 MST 2017



Hi,

I am learning Magento 2.  Magento suggests setting the file/director 
owner to Apache if on CentOS.  I am on CentOS 7.  Magento offers a 
command line utility - bin/magento which can do a number of things such 
as enable or disable modules, clear cache etc.  It also creates files.

I ran the Magento command as root and the files it created were owned by 
root.

I tried to become the apache user with command : su - apache  which 
returned "This account is currently not available."

I Assume it would would be best to become the apache user while working 
from the command line on Magento.

Is my thought process reasonable?  And id so how do I modify the apache 
user to I can become the apache user?  Or is there a better practice.

At this point I have to become root and do a chown apache -R 
magento-directory.

Thanks in advance for your help!!

Keith


More information about the PLUG-discuss mailing list