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
5条回答 默认 最新
- duanbiao4035 2012-02-07 18:03关注
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 "{}" \;
File name with space case (thanks to Nicklas B)
find . -type f -print0 | xargs -0 chmod 644
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥20 win10商店接入问题
- ¥15 java 这种树形框吗
- ¥40 找同学帮敲Python代码
- ¥15 MYSQL 订单的商品明细重复计算问题
- ¥15 微信实时共享位置修改
- ¥100 TG的session协议号转成直登号号后客户端登录几分钟后自动退出设备
- ¥50 共模反馈回路的小信号增益
- ¥15 arduino ssd1306函数与tone函数放歌代码不兼容问题
- ¥70 0.96版本hbase的row_key里含有双引号,无法deleteall
- ¥15 诊断性META分析合并效能的检验