I have installed and configured apache on RedHat 7 Image on AWS. But I have issues with permissions/ownership while uploading files by ssh using filezilla.
I Setup a ssh user and added its home dir to apache /var/www/html/ and installed Magento on it.
Original Setup:
- User:Group of /var/www/html/ is apache
- User: root / Group: apache for /var/lib/php/session dir(not sure but I think magento stores session files there as well as i get write error when owner is changed)
- httpd.conf User:Group is apache
- With these settings, cannot upload files with ftp or sftp - permission error.
When I changed to:
- User:Group of /var/www/html/ is ssh_user
- User: ssh_user / Group: ssh_user for /var/lib/php/session dir
- httpd.conf User:Group is ssh_user
- With these, i was able to upload but cache files are generated as root.
What I want is:
- User:Group of /var/www/html/ is ssh_user
- Default settings for /var/lib/php/session dir
- httpd.conf User:Group is apache
I want to be able to upload files through ftp or sftp by regular user.
How do i acheive this? This is the first time i have setup apache so just trying to learn how to do it right way.