Linux特殊权限总结篇

  • A+
所属分类:运维教程

之前我们简单聊了下suid/sgid/sbit,今天我们就来总结一下这些特殊权限。

首先要说到的是大小写问题,我们看下图片:

Linux特殊权限总结篇

我们看到两个文件,权限都差不多,一个所有者执行权限位是S,另一个则为s,这两个有什么区别?

在没有增加特殊权限时,默认权限为rwxr-xr-x,加上特殊权限之后,s替换x,而之前是否有x权限呢?就是通过s的大小写确认的。如果是s代表其有执行权限,S则代表没有。

我们给cjk添加执行权限试验一下,看下结果:

Linux特殊权限总结篇

接下来我们说下第二个问题,数字问题:

我们知道,4代表r,2代表w,1代表x,通过数字可以代表或是修改权限,那特殊权限如何通过数字来代表或修改呢?

Linux特殊权限总结篇

如图,在修改权限时,我们可以在普通权限的数字前面,再加一个八进制的数字,用于代表特殊权限。

这里:4代表suid,2代表sgid,1代表sbit。

  • 问答中心
  • 微信小程序扫一扫
  • weinxin
  • 微信公众
  • 微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:10   其中:访客  10   博主  0

    • avatar all british casino bonus

      Hi there! Do you know if they make any plugins to assist with SEO? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good gains. If you know of any please share. Thanks!

      • avatar try this

        Excellent post however I was wanting to know if you could write a litte more on this topic? I’d be very thankful if you could elaborate a little bit further. Thanks!

        • avatar erjilopterin

          Great remarkable issues here. I?¦m very happy to see your article. Thank you a lot and i am looking forward to touch you. Will you please drop me a e-mail?

          • avatar visit website

            I really like your writing style, superb information, appreciate it for putting up : D.

            • avatar http://www.lesptitutos.fr/

              I haven¦t checked in here for a while because I thought it was getting boring, but the last several posts are great quality so I guess I¦ll add you back to my daily bloglist. You deserve it my friend :)

              • avatar smoretraiolit

                Good write-up, I am regular visitor of one?¦s website, maintain up the excellent operate, and It’s going to be a regular visitor for a long time.

                • avatar smoretraiolit

                  I’ve been exploring for a little bit for any high-quality articles or weblog posts on this kind of house . Exploring in Yahoo I finally stumbled upon this web site. Reading this info So i’m glad to express that I’ve an incredibly just right uncanny feeling I discovered exactly what I needed. I so much undoubtedly will make certain to don’t forget this web site and provides it a glance regularly.

                  • Hi there, just became alert to your blog through Google, and found that it is truly informative. I’m going to watch out for brussels. I will appreciate if you continue this in future. Numerous people will be benefited from your writing. Cheers!

                    • avatar Criminal Appeals

                      Hi , I do believe this is an excellent blog. I stumbled upon it on Yahoo , i will come back once again. Money and freedom is the best way to change, may you be rich and help other people.

                      • avatar Mira Neufeld

                        What’s Happening i am new to this, I stumbled upon this I have found It positively useful and it has aided me out loads. I hope to contribute & assist other users like its helped me. Good job.