79

Dev : Can you change permissions for conf file please ?
Me : Yeah sure, what permissions set do you need ?
Dev : 667
Me: ...

Comments
  • 5
    What'd you expect? Windows permissions?
  • 29
    @olback I was like why in the world you need to give "others" more permissions than file owners he replied that it provide a better security than 777...
  • 0
    @undefinedUser ah right... Didn't get that.
  • 4
    @senzory It's octal, so each digit represents a set of permissions for read, write, execute. 3 bits can be represented by a single octal digit.
  • 11
    @senzory
    First number - owner
    Second - group
    Third - everyone
    And then you have 3 bits: read, write execute, starting with highest bit
    So read is 4, write 2, execute 1
    - add up and you get the number
  • 10
    @senzory

    It's kinda simple

    4 read + 2 write + 1 execute = 7

    First digit for owner user

    Second digit for owner group

    Third digit for everyone else.

    667 means that anyone can execute the file except it's owner and it's group.
  • 1
    I am also a noob when it comes to those.

    So my question is what happen to

    3 ? is it delete?
  • 8
    @CurseMeSlowly I think 3 was skipped because we won't be able to make unique combination with.

    Imagine r=3 w=2 and x=1 if a file have 333 permissions you won't be able to know if it's r--r--r-- or -wx-wx-wx.

    Sorry if it's still complicated but it's a math thing..
  • 1
    @peacWhis ahhh right right. thank you.

    @undefinedUser silly me lol .. suck at math :P
  • 6
    @undefinedUser @CurseMeSlowly
    I think the best way is to think of it with the bits. first bit counts 1, second counts 2, third bit counts 4.
    Then you can represent all numbers from 0 (000) to 7 (111) with unique combinations and you only have to remember the read, write, execute order and that that order is from left to right and the bits' signifcance rises from right to left.
  • 2
    @simulate Yeah right .. that's what I've tried to explain without math lingo
  • 1
    @undefinedUser
    Yeah and you succeeded, I didnt understand this before 😁 I just had to put it into words for myself to see if I actually got it right.
  • 1
    @ElToastGrande Never knew that, thanks!
  • 0
    At least it was better than 777
  • 1
    000 is mre secured
  • 3
  • 0
    @sladuled Glad it doesn't run GNU/LINUX or does it?
  • 1
    @ElToastGrande thanks. That's a very simple way to memorise it! :)
  • 0
    I just copy and pasted these chmod numbers all the time. E.g. tutorials. But I never knew what they all really stand for and how it is what it is.

    Tbh it is very clever to give people permission that way. Very Simple and efficient I must admit. You guys helped a noob out :D
  • 0
    Lots of thanks ^^
  • 2
    @undefinedUser I though he'd say 666 🤣
  • 1
    @sladuled Anyone can fly those.
Add Comment