启用写入权限Ubuntu服务器中的无功/网络/ image目录 [英] Enabling write permissions Ubuntu Server in var/www/image directory
本文介绍了启用写入权限Ubuntu服务器中的无功/网络/ image目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图让我的PHP测试上传脚本工作,不知道什么该命令将允许文件在Ubuntu服务器在var / WWW / image目录上传
解决方案
CD /无功/网络/图片
有关文件,如图片,你不需要执行权限:
sudo的搭配chmod 664 *
如果您有内部图像目录和要应用权限:
sudo的发现。 ð型-exec行chmod 755{}\\;
这将递归搜索目录只有755的所有目录文件模式。
类似地,以下将搭配chmod只有所有的文件(并忽略目录):
sudo的发现。型的F -exec搭配chmod 644{}\\;
I'm trying to get my php test upload script to work and was wondering what the command would be to allow files to be uploaded in ubuntu server in the var/www/image directory
解决方案
cd /var/www/image
For file like image you don't need execution permission :
sudo chmod 664 *
If you have directories inside image and you want to apply permission :
sudo find . -type d -exec chmod 755 "{}" \;
This will recursively search your directory and chmod 755 all directories only.
Similarly, the following will chmod all files only (and ignore the directories):
sudo find . -type f -exec chmod 644 "{}" \;
这篇关于启用写入权限Ubuntu服务器中的无功/网络/ image目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文