Linux

如何將 /bin /boot /etc 和 /dev 的權限重置為原始所有者 Ubuntu?

  • April 28, 2010

當我放錯正斜杠時,我不小心將 /bin、/boot、/etc 和 /dev 的所有權遞歸地更改為nobody:nogroup 使用 chown!

我怎樣才能訴諸原始文件的所有權?

我已經設法將它們全部放到 root:root 中,但我不確定是否所有文件都應該歸 root 所有,這是否會破壞某些東西?

它們是否可以像 OS X 中那樣修復文件權限?

幫助!

我執行 debian 擠壓,我使用了以下命令:

$> sudo find /bin /boot /etc /dev ! \( -user root -group root \) -printf '%p\t%u\t%g\n'

獲取不屬於 root:root 的文件列表(將普通使用者更改為“me”):

/etc/shadow root    shadow
/etc/privoxy/trust  privoxy root
/etc/privoxy/global.action  privoxy root
/etc/privoxy/user.action    privoxy root
/etc/privoxy/global.action.dpkg-old privoxy root
/etc/identd.key identd  root
/etc/at.deny    root    daemon
/etc/ssl/private    root    ssl-cert
/etc/ssl/private/ssl-cert-snakeoil.key  root    ssl-cert
/etc/gshadow    root    shadow
/etc/cups   root    lp
/etc/cups/printers.conf.O   root    lp
/etc/cups/printers.conf root    lp
/etc/cups/ssl   root    lp
/etc/cups/ssl/server.crt    root    lp
/etc/cups/ssl/server.key    root    lp
/etc/cups/ppd   root    lp
/etc/fuse.conf  root    fuse
/etc/exim4/passwd.client    root    Debian-exim
/dev/dri/card0  root    video
/dev/xconsole   root    adm
/dev/fuse   root    fuse
/dev/loop5  root    disk
/dev/loop6  root    disk
/dev/loop2  root    disk
/dev/loop3  root    disk
/dev/loop7  root    disk
/dev/loop1  root    disk
/dev/loop4  root    disk
/dev/mixer1 root    audio
/dev/dsp1   root    audio
/dev/audio1 root    audio
/dev/mixer  root    audio
/dev/dsp    root    audio
/dev/adsp   root    audio
/dev/audio  root    audio
/dev/snd/controlC1  root    audio
/dev/snd/pcmC1D0p   root    audio
/dev/snd/pcmC1D0c   root    audio
/dev/snd/controlC0  root    audio
/dev/snd/pcmC0D4p   root    audio
/dev/snd/pcmC0D3c   root    audio
/dev/snd/pcmC0D0p   root    audio
/dev/snd/pcmC0D1c   root    audio
/dev/snd/pcmC0D0c   root    audio
/dev/snd/pcmC0D2c   root    audio
/dev/snd/seq    root    audio
/dev/snd/timer  root    audio
/dev/loop0  root    disk
/dev/shm/pulse-shm-2780159313   me  me
/dev/shm/pulse-shm-1228309411   me  me
/dev/shm/pulse-shm-1153223704   me  me
/dev/shm/pulse-shm-3080420302   me  me
/dev/shm/pulse-shm-1994524084   me  me
/dev/pts/3  me  tty
/dev/pts/5  me  tty
/dev/pts/4  me  tty
/dev/pts/2  me  tty
/dev/pts/1  me  tty
/dev/pts/0  me  tty
/dev/hda1   root    disk
/dev/hda2   root    disk
/dev/hda    root    disk
/dev/hdc    root    cdrom
/dev/agpgart    root    video
/dev/fd0    root    floppy

手動更改不應該太多,希望您的系統與我的系統沒有太大差異。

引用自:https://serverfault.com/questions/136694