Linux刪除檔案提示Operation not permitted
這個一般是許可權的問題,比如:
1. 普通使用者且有足夠的許可權的話,一般資料夾可能是別的服務/程序掉用該資料夾
lsof +D /你要刪除的目錄路徑
先執行上面的命令,查詢到呼叫該資料夾的程序IDs,然後再kill掉,這個時候應該就可以刪了!
2. 普通使用者且缺乏許可權的話,如果要刪除該資料夾則要藉助su或者sudo命令來刪除
3. 如果是root使用者,依然報上面的錯的話,則該檔案很可能被鎖定
[[email protected] ~]# lsattr YourFile ---i---------- YourFile
則要藉助lsattr命令來檢視是否是系統添加了i,屬性,比如上面。這個引數可以讓一個檔案『不能被刪除、改名、設定連結也無法寫入或新增資料!對於系統安全性有相當大的幫助!這個命令也是你既然是root使用者,依然不能執行刪除操作的原因。 然後再借助chattr命令來去除該屬性
[[email protected] ~]# chattr -i YourFile
[[email protected] ~]# lsattr YourFile
然後就可以刪除該檔案了!
注意:i屬性chattr命令並不適合所有的目錄。chattr命令不能保護/、/dev、/tmp、/var目錄。
更多內容請參考原文地址:https://www.codelovers.cn/article/20181130165712.html
相關推薦
Linux刪除檔案提示Operation not permitted
這個一般是許可權的問題,比如: 1. 普通使用者且有足夠的許可權的話,一般資料夾可能是別的服務/程序掉用該資料夾 lsof +D /你要刪除的目錄路徑 先執行上面的命令,查詢到呼叫該資料夾的程序IDs,然後再kill掉,這個時候應該就可以刪了!
Linux 檔案刪除提示 Operation not permitted
Linux 刪除檔案 隱藏檔案提示 Operation not permitted ? linux 刪除 隱藏檔案 提示 Operation not permitted 不允許操作? 使用 lsattr 檢視檔案的屬性; l
【Mac OS】Mac部分目錄讀寫提示“Operation not permitted”解決
問題產生 今天在將mac預設安裝的python2.7升級為python3時,終端執行: sudo mv /usr/bin/python /usr/bin/python_old 提示“Operation not permitted”,操作不成功。 問題分析 筆
Unix/Linux 系統中的 Operation Not Permitted 問題
1. 前言 多次在 Mac 使用過程中遇到 Operation Not Permitted 問題,之前都是略過,今天好好摸索了一把,搞明白了道理,記錄下來。 好幾次整理行動硬碟資料的時候,都遇到了 Operation Not Permitted 問題,檔案移動不
關於centos下 root使用者刪除沒有許可權 Operation not permitted 的解決
前幾天,我的阿里雲伺服器被挖礦了。在刪除病毒指令碼之後,發現有個檔案,我用root使用者,無許可權刪除。 這時候,就要引入兩個命令 lsattr chattr lsattr yilu/work/xig # 發現有 i 所以要幹掉i才能刪除 ch
Mac部分目錄讀寫提示“Operation not permitted”解決
今天試圖在mac os x下重新命名/usr/bin/python,提示Operation not permitted,雖然我是r
解決Linux 下 root使用者刪除檔案提示:Operation not permitted
問題描述 用最高許可權rm檔案,居然報錯Operation not permitted。檢視許可權也沒有問題。可想而知有可能檔案被保護了。用命令lsattr檢查一下就知道。 [[email protected] root]# lsattr a.txt ---i---------- a.
Linux刪除檔案出現rm: cannot remove `.user.ini': Operation not permitted
在Linux中rm -rf的威力是十分巨大的,特別是附帶了 -f 引數,不少新手都幹過用root使用者執行 rm -rf /命令這
linux操作提示:“Can't open file for writing”或“operation not permitted”的解決辦法
在linux上使用vi命令修改一個檔案內容的時候,發現無法儲存,每次寫完使用“:q!”命令可以正常退出但是使用":wq!"命令儲存檔案並退出時出現一下資訊提示: E212: Ca
Linux下UDP發送大量請求導致Operation not permitted的問題探討
通過 微服務 com 發現 又是 get 端口 www 模式 一、問題背景目前公司準備上微服務的架構模式,在對比大量的API網關之後,最後選中了Kong作為我們的API網關,在經過大量的研究之後,啊呸,踩坑之後,終於跑起來了,簡直是普天同慶,撒花祝賀。 但是在美滋滋的進行性
AIX下掛載Linux文件系統nfs-vmount: Operation not permitted
nfs-vmount: operatioaix下面掛載linux文件系統,失敗,如下代碼# mount 10.0.0.10:/Tbackup /backmount: 1831-008 giving up on:10.0.0.10:/Tbackupvmount: Operation not permitted.
npm install 提示許可權不足 Error: EPERM: operation not permitted, unlink XXX
問題 使用npm install時提示許可權不足 原因 這裡原因有兩個: 沒有管理員許可權訪問C盤下npm路徑導致下載失敗。 NPM官網沒有下載許可權。 解決方案 第一原因 這裡可以使用管理員身
【Linux】date:cannot set date:operation not permitted
前言 小編最近安裝了Linux的虛擬機器Centos,並在網上找到了學習Linux的網站《Linux就該這麼學》,正在跟著裡面的教程學習這塊的知識,遇到了問題,下面是具體的解決過程。 date命令執行失敗 date命令學習時,執行設定系統時間時,出現了這
adb remount 失敗:remount failed: Operation not permitted
post wrap env 軟件 mtd opera sync 讀寫權限 .cn adb remount 失敗:remount failed: Operation not permitted 關於ADB的使用,這裏再說明下:經常使用命令 adb
Mac OS Sierra 安裝PHP擴展 Operation not permitted
問題解決 targe local 菜單 -m ces 操作 phpredis lan 想看詳細解讀的可以 點這裏 只需要解決問題直接往下看就好 ---------------------------------------------------分 割 線--------
修改文件的所有者失(chown: changing ownership of `uploads': Operation not permitted)
php5 upload 用戶 上傳 ati 記得 創建者 roo ted 在項目開發的時候,經常需要將文件上傳到指定的目錄下。 例如這次用thinkphp5的時候,需要在public目錄下建立uploads目錄用於存放上傳的資源。 首先在命令窗口下輸入: 1 mkdir
docker容器中啟動service服務 Failed to get D-Bus connection: Operation not permitted
docker容器中啟動service服務 failed to get d-bus connection: operation not permitted解決方案:啟動時設置參數 --privileged使用該參數,container內的root擁有真正的root權限。否則,container內的root只是
使用npm install報錯-4048 operation not permitted解決
not 自己 images 管理 all mini blog 明顯 match 剛剛使用npm install時一直報錯-4048 operation not permitted,也嘗試了多種方法,終於使問題得到解決,這裏總結幾種方法,先貼圖: 一:權限問題 首先看
npm install 報錯(npm ERR! errno -4048,Error: EPERM: operation not permitted,)解決方法
win npm support comm project 需要 event sin 命令 npm ERR! path E:\SouthernPowerGridProject\web_project\AutoOPS\autoops\node_modules\fsevents\
systemd-tmpfiles - Operation not permitted chown ; systemd-modules-load.service
pmo chown lib export ati ron strong tro 提示 systemd-tmpfiles-setup.service fail 一般為 /exports/rfs/var/lib/systemd/ 下的文件屬性問題 , chown -R