chmod u+s是什么意思


今天突然不能su到root了,root密碼是正確的,但是就是顯示密碼錯誤
還有mount也不能在一般用戶里用了,不管有沒有設備,都說沒有權限

到google上搜索了一番,發現了這樣一段:
---------------------------
Try doing (note back-ticks not quotes)
$ ll `which mount`
it should report :

$ ll `which mount`
-rwsr-xr-x 1 root root 52788 Apr 17 16:54 /bin/mount
^
|
/
This means the mount program is setuid root. If your copy is not,
you will need to do a chmod u+s `which mount` while logged in as root.

This should fix it. If you still have problems, you could check the
permissions of your cdrom device in /dev, but I don't think this is the
problem.
-----------------------------

運行了一下chmod u+s /bin/*,結果就都好了
u+s代表什么意思呢?

作者: cobranail   發布時間: 2004-11-24

給/bin/* 的擁有者增加可執行權限。

很多人可能都喜歡用chmod 755、644、777等賦予權限,其實還是用chmod ugo+rwx這樣的形式比較直觀。

u--擁有者
g--同組用戶
o--其它用戶
r--可讀
w--可寫
x--可執行
s--可執行(跟x差不多,我還不清楚兩者的區別)

作者: hupeng923   發布時間: 2004-11-24

chmod u+s `which mount` 會將/bin/mount設成setuid root, 即是說任何用戶在執行這個指令時會擁有root權限,可以想superuser一樣用此指令做這個指令可做的任何事。Root擁有的setuid的程序有潛在的危險性,一般用sudo來設置會好一點。

作者: Fleta   發布時間: 2004-11-24

恩,對,但是有時候需要,

作者: xiaorui   發布時間: 2004-11-24

some experiences for guys here:

i noticed that usually only several items in /bin/ should have the priviliage of 's',such as mount, su, ping, umount and so on.
So to solve the problem above you can use the command 'chmod u+s' only to these command instead of /bin/*.

作者: lvzhe   發布時間: 2004-11-26

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM