Friday, October 24, 2014

linux - User Group permission for apache website

Apache is running with www-data:www-data



I added a user



sudo useradd -s /bin/false -d /var/www/dev -m dev



and added to www-data group



sudo usermod -G www-data --append dev

uid=1001(dev) gid=1001(dev) groups=1001(dev),33(www-data)


Now when a website running from /var/www/dev, it is getting permission denied error when trying to write something like logs,cache.
All files and folder at /var/www/dev is dev:dev. Not using Suexec.




But if I am changing group to dev:www-data it is working fine.



How I can get write permission for apache with dev:dev permission?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...