应该apache上传目录有777权限或属于www数据用户? [英] should apache upload dir have 777 permissions or belong to www-data user?

查看:147
本文介绍了应该apache上传目录有777权限或属于www数据用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Apache和我的PHP网站上传图像到服务器。应该apache上传目录有777权限或属于www数据用户?这将如何影响备份?

解决方案

我认为读写权限就够了。读取备份,写入上传。似乎没有人需要执行任何操作。



您应该只授予真正需要它们的权限。例如,将写入权限授予www-data。如果您使用其他用户进行备份,则只能将读取权限授予其他用户。



您最好避免使用777


I'm running apache and my php site uploads images to the server. should apache upload dir have 777 permissions or belong to www-data user? How would this affect backing things up?

解决方案

I think read + write permission is enough. read for backup, write for upload. It seems that no one ever need to execute anything.

And you should only grant permissions to who really need them. For example, grant write permission to www-data. And if you use another-user to do back up, only grant read permission to another-user.

You'd better avoid using 777

这篇关于应该apache上传目录有777权限或属于www数据用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆