我正在運行一個本地的nginx服務器,用php編寫一段基本上有上傳功能的代碼。我需要將圖像上傳到文件夾tmp
然後開始工作。但我想有一些與文件夾權限問題因爲PHP的發送回錯誤UPLOAD_ERR_CANT_WRITE
。Nginx的文件上傳權限錯誤,PHP
目錄ls -l
:
drwxr-xr-x 2 root root 4096 Mar 22 19:20 assets
-rw-r--r-- 1 root root 1564 Mar 22 19:20 cropper.php
drwxr-xr-x 5 root root 4096 Mar 22 19:20 files
drwxr-xr-x 2 root root 4096 Mar 22 19:20 images
-rw-r--r-- 1 root root 10018 Mar 22 19:20 index.htm
-rw-r--r-- 1 root root 7972 Mar 22 19:20 second-page.php
drwxrwxr-x 2 arjun www-data 4096 Mar 22 19:20 tmp
我試圖改變周圍的權限,但他們繼續失敗。那麼我怎麼擺脫這個混亂?