Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@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...
-
@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.
-
@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 -
@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. -
cursee171597yI am also a noob when it comes to those.
So my question is what happen to
3 ? is it delete? -
@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.. -
cursee171597y
-
@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. -
@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. -
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
Related Rants
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus60Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
Dev : Can you change permissions for conf file please ?
Me : Yeah sure, what permissions set do you need ?
Dev : 667
Me: ...
rant
linux