linux chmod 導致崩潰

linux chmod 導致崩潰

我需要向代表 GPIO 引腳的檔案授予寫入權限,出於好奇,我錯誤地教了更改所有檔案/資料夾的權限,而不是這樣做修改 755 *在根部

我做到了修改 750 *系統崩潰了(無法啟動),儘管我透過使用 live cd 覆蓋權限解決了問題。扇區並將控制權交給作業系統即可。

是否將入口代碼視為其他的,或者某些進程可能需要設定這些權限?

答案1

/tmp 上的權限可能仍然混亂。

我在 CentOS 5 上的根檔案系統如下:

[8:21am][wlynch@apple ~] ls -al /
total 178
drwxr-xr-x  24 root root  4096 Feb  1 20:56 .
drwxr-xr-x  24 root root  4096 Feb  1 20:56 ..
-rw-r--r--   1 root root     0 Feb  1 20:56 .autofsck
-rw-r--r--   1 root root     0 Jan 25 14:55 .autorelabel
drwxr-xr-x   2 root root  4096 Feb  8 04:02 bin
drwxr-xr-x   4 root root  1024 Jan 25 15:21 boot
drwxr-xr-x  11 root root  3700 Feb  6 11:20 dev
drwxr-xr-x 106 root root 12288 Feb  8 04:02 etc
drwxr-xr-x   3 root root  4096 Jan 25 14:56 home
drwxr-xr-x  11 root root  4096 Jan 31 18:18 lib
drwxr-xr-x   8 root root 12288 Feb  8 04:02 lib64
drwx------   2 root root 16384 Jan 25 08:44 lost+found
drwxr-xr-x   2 root root  4096 May 11  2011 media
drwxr-xr-x   2 root root     0 Feb  1 20:57 misc
drwxr-xr-x   3 root root  4096 Jan 25 20:01 mnt
drwxr-xr-x   2 root root     0 Feb  1 20:57 net
drwxr-xr-x   5 root root  4096 Jan 25 16:41 opt
dr-xr-xr-x 150 root root     0 Feb  1 14:56 proc
drwxr-x---   7 root root  4096 Feb  6 11:21 root
drwxr-xr-x   2 root root 12288 Feb  8 04:02 sbin
drwxr-xr-x   2 root root  4096 Jan 25 14:45 selinux
drwxr-xr-x   2 root root  4096 May 11  2011 srv
drwxr-xr-x  11 root root     0 Feb  1 14:56 sys
drwxrwxrwt  15 root root  4096 Feb  8 08:20 tmp
drwxr-xr-x  15 root root  4096 Jan 25 14:47 usr
drwxr-xr-x  22 root root  4096 Jan 25 14:51 var

相關內容