日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux 使用nginx 权限不够,对于nginx和Linux,有一些关于权限的问题。

發布時間:2023/12/19 linux 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 使用nginx 权限不够,对于nginx和Linux,有一些关于权限的问题。 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

I've recently moved to Digital Ocean after using shared hosting for years!

我最近才搬到數字海洋,用了多年的共享主機!

I'm loving the freedom to install and change anything I want, but I'm unclear about some things.

我喜歡安裝和改變任何我想要的東西的自由,但是我不清楚一些事情。

I'm using the LEMP stack installed on Ubuntu 12.04.4x64. I've followed This tutorial here to create a separate account "Archer" so I won't have to use the root account all the time.

我正在使用安裝在Ubuntu 12.04 4x64上的LEMP棧。我在這里按照本教程創建了一個單獨的帳戶“Archer”,因此我不必一直使用根帳戶。

Even though Archer has admin permissions I still couldn't edit files in the server using SFTP. SSH works, but not SFTP. So I made Archer owner of the folders I wanted to edit. In nginx.conf I changed the user from "www-data" to "Archer"

盡管Archer具有管理權限,我仍然不能使用SFTP編輯服務器中的文件。SSH能夠工作,但不能使用SFTP。所以我讓Archer的所有者,我想編輯的文件夾。nginx。conf我將用戶從“www-data”更改為“Archer”

Now I have a few PHP scripts that save images in my server. They don't have permission to save those images anymore. Cronjobs aren't working either.

現在我有一些PHP腳本可以在服務器中保存圖像。他們沒有權限保存這些圖像。計劃不奏效。

I am thinking they are all related and I messed up on something basic. I'd appreciate any and all help in the right direction!

我認為它們都是相關的,我搞砸了一些基本的東西。我希望能在正確的方向上得到任何和所有的幫助!

1 個解決方案

#1

3

I'd suspect a problem with changing the folders/files owner from "www-data" to "Archer", since that seems to be when the problems started. Try changing the owner back to "www-data" and see if that fixes the PHP scripts permissions problems.

我懷疑將文件夾/文件所有者從“www-data”更改為“Archer”的問題,因為這似乎是問題開始的時候。嘗試將所有者更改為“www-data”,看看這是否修復了PHP腳本權限問題。

THEN, if the new user Archer can't edit some files, I'd add the Archer user to a group that has permission to edit the files, use a command like usermod -a -G groupName userName (recommended here https://stackoverflow.com/a/7283086/3412074 or you could edit /etc/groups directly )

然后,如果新用戶Archer不能編輯某些文件,我將Archer用戶添加到具有編輯文件權限的組中,使用usermod -a -G group name命令(建議使用https://stackoverflow.com/a/7283086/3412074或者直接編輯/etc/groups)

Adding Archer to the "www-data" group should work (it seems to be a standard group on Ubuntu-based things)

向“www-data”組添加Archer應該是可行的(它似乎是基于ubuntu的標準組)

sudo usermod -a -G www-data Archer

sudo usermod -a -G www-data Archer

總結

以上是生活随笔為你收集整理的linux 使用nginx 权限不够,对于nginx和Linux,有一些关于权限的问题。的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。