首页 > √linux > linux
viyin.net

linux

2010年3月16日 发表评论 阅读评论

chmod 751 /bin
chmod 751 /selinux
chmod 751 /var
chmod 751 /media
chmod 751 /mnt
chmod 751 /sbin
chmod 751 /etc
chmod 751 /boot
chmod 751 /lib
chmod 755 /dev
chmod 751 /usr
chmod 751 /srv
chmod 751 /misc
chmod 755 /sys
chmod 751 /opt
chmod 751 /home
chmod 551 /proc
chmod 751 /usr/local/
chmod 751 /usr/local/mysql
chmod 751 /usr/local/mysql/bin
chmod 751 /usr/local/nginx/conf/
chmod 751 /usr/local/nginx/conf/viyin.net
chmod -R 700 /etc/rc.d/init.d/*

chattr +i /etc/passwd
chattr +i /etc/shadow
chattr +i /etc/group
chattr +i /etc/gshadow

web根目录
chown root:root /data/web
chmod 751 /data/web
chown www:root /usr/local/nginx/conf/

参考
chmod go-rx /etc/rc.d/init.d
chmod o-r /etc/rc.d/init.d/* //去掉几个目录的列权限

chmod go-rx /usr/bin/gcc
chmod go-rx /usr/bin/g++
chmod go-rx /usr/include //去掉glibc的其他用户的权限

cd /
chmod o-r *
cd /usr
chmod o-r *
cd /var
chmod o-r *
chmod go-r /etc/httpd/conf

viyin.net
分类: √linux 标签:
  1. 2010年3月17日13:43 | #1

    最近在也使用LINUX,收藏了.

  1. 本文目前尚无任何 trackbacks 和 pingbacks.