www-data permissions?

前端 未结 2 1879
你的背包
你的背包 2020-11-27 09:19

So I have a directory in /var/www (called cake) and I need to allow www-data to write to it, but I also want to write to it (without having to use sudo). I\'m afraid to chan

2条回答
  •  眼角桃花
    2020-11-27 09:24

    sudo chown -R yourname:www-data cake
    

    then

    sudo chmod -R g+s cake
    

    First command changes owner and group.

    Second command adds s attribute which will keep new files and directories within cake having the same group permissions.

提交回复
热议问题