亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    WordPress不能將上傳的文件移動(dòng)至wp-content/uploads

    下面由WordPress教程欄目給大家介紹WordPress中無法將上傳的文件移動(dòng)至wp-content/uploads的解決辦法,希望對(duì)需要的朋友有所幫助!

    WordPress不能將上傳的文件移動(dòng)至wp-content/uploads

    解決WordPress中無法將上傳的文件移動(dòng)至wp-content/uploads

    搭建lnmp環(huán)境,放一個(gè)wordpress建站系統(tǒng)

    lnmp環(huán)境很快就搭建完成了,但是在放wordpress的時(shí)候出現(xiàn)了一些問題

    最主要的問題:

    1.第一個(gè)是wp-content/uploads沒有權(quán)限創(chuàng)建,

      這個(gè)自己手動(dòng)創(chuàng)建一下,給個(gè)777權(quán)限就好了。

    2.無法將上傳的文件移動(dòng)至wp-content/uploads。

      這是個(gè)主要的問題,也是比較麻煩的問題,百度的答案都是千篇一律的設(shè)置777權(quán)限,不要中文用戶名,

      沒有一點(diǎn)用。

      在獲得解決辦法之前首先描述一下背景

      裝lnmp環(huán)境的時(shí)候全部是使用root用戶安裝的,但是當(dāng)我放程序的時(shí)候是新創(chuàng)建了一個(gè)morequ用戶,程序全部放到這個(gè)用戶下,然后用nginx代理。

      這就出現(xiàn)了權(quán)限問題。

      翻遍了百度,一點(diǎn)用都沒有,最后用bing搜索得到了一個(gè)答案。

    按照他的方法改了之后,連http都過不去,直接500了,經(jīng)過多番努力,最終得到答案。

      a)修改nginx.conf

    在這個(gè)文件的最開始,有個(gè)設(shè)置user的地方,修改為:

    user  root root; worker_processes  1;

    b)修改php-fpm.conf

      在這個(gè)文件里看到這么一句話:

    ; Include one or more files. If glob(3) exists, it is used to include a bunch of ; files from a glob(3) pattern. This directive can be used everywhere in the ; file. include=/etc/php-fpm.d/*.conf

    可以進(jìn)入這個(gè)文件夾看一下,其中有一個(gè)www.conf文件

      修改這個(gè)文件的:

    ; Set permissions for unix socket, if one is used. In Linux, read/write ; permissions must be set in order to allow connections from a web server. Many ; BSD-derived systems allow connections regardless of permissions. ; Default Values: user and group are set as the running user ;                 mode is set to 0666 ;listen.owner = morequ ;listen.group = morequ ;listen.mode = 0666 ; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ;       will be used. ; RPM: apache Choosed to be able to access some dir as httpd user = morequ ; RPM: Keep a group allowed to write in log dir. group = morequ

      將本來的www用戶改為我當(dāng)前的用戶。

      結(jié)果成功。

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)