doudizhu2222 2013-12-24 00:14
浏览 35

我无法通过代码点火器将文件上传到网页

I'm new in the use of code igniter, however I have been having a problem while trying to upload files to a certain directory.

You see, I've tested the page in localhost, and I have no problem in uploading files in that situation, however, whenever I try to run that on server I keep getting the message that:"the directory doesn't appear to be writable". If I change the directory privileges to 777, fixes the problem, however that is a bad practice while developing a web page, and I would like it to keep the privileges in 775 at the least.

I have also found out that the executing 'whoami' I get the username 'wwwrun' so, is it possible to change the configuration of code igniter so that it runs with an user that owns that directory?

I really hope you can help me with this problem since, I haven't found a clear solution since I don't know where to begin...

  • 写回答

1条回答 默认 最新

  • duanchi5078 2013-12-24 00:19
    关注

    you change the permssion before code igniter uploads, the folder should be owned by wwwrun and maybe in the wwwrun group, Maybe in the coders group ?

    When its chowned to wwwrun having permission 700 or 750 will be fine

    评论

报告相同问题?

悬赏问题

  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比