duanjiagu0655 2012-02-07 17:54
浏览 115
已采纳

在var / www / image目录中启用写权限Ubuntu Server

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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥100 ensp启动设备蓝屏,代码clock_watchdog_timeout
  • ¥15 Android studio AVD启动不了
  • ¥15 陆空双模式无人机怎么做
  • ¥15 想咨询点问题,与算法转换,负荷预测,数字孪生有关
  • ¥15 C#中的编译平台的区别影响
  • ¥15 软件供应链安全是跟可靠性有关还是跟安全性有关?
  • ¥15 电脑蓝屏logfilessrtsrttrail问题
  • ¥20 关于wordpress建站遇到的问题!(语言-php)(相关搜索:云服务器)
  • ¥15 【求职】怎么找到一个周围人素质都很高不会欺负他人,并且未来月薪能够达到一万以上(技术岗)的工作?希望可以收到写有具体,可靠,已经实践过了的路径的回答?
  • ¥15 Java+vue部署版本反编译