• 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

  • 相关阅读:
    手把手带你画一个 时尚仪表盘 Android 自定义View
    新手自定义view练习实例之(二) 波浪view
    新手自定义view练习实例之(一) 泡泡弹窗
    增加辅助的数据库组件
    解决Plugin is too old,please update to a more recent version,or set ANDROID_DAILY_OVERRIDE..
    Android 自定义View -- 简约的折线图
    android 开源图表库MPChart最简单使用方法示例教程Demo--折线图 柱状图
    改善database schema
    题解报告:hdu 2057 A + B Again
    hdu 2087 剪花布条(KMP入门)
  • 原文地址:https://www.cnblogs.com/bruce1992/p/14307745.html
Copyright © 2020-2023  润新知