I've never really got how chmod worked up until today. I followed a tutorial that explained that youve got three different permission groups:
- owner (u)
- group (g)
- everyone (o)
I've also learned that you've got the following permissions:
- read (r)
- write (w)
- execute (x)
I created a directory to test my newly aqcuired knowledge:
mkdir test
Then I did some tests:
chmod u+rwx test/
# drwx------
chmod g+rx test/
# drwxr-x---
chmod u-x test/
# drw-r-x---
After fooling around for some time I think I finally got the hang of chmod and the way you set permission using this cmmand.
But...
I still have a few questions:
- What does the
dat the start stand for? - What are other values that this part of the permissions can hold?
- How can I set and unset it?
- What is the value for this
d? (As you only have 7=4+2+1 7=4+2+1 7=4+2+1) - Why do people sometimes use
0777instead of777to set their permissions?
But as I shouldn't be asking multiple questions, I'll try to ask it in one question.
In UNIX/Linux file permissions, what does the first part (d) stand for and what's the use for this part of the permissions?
I would like to add that I am new to the whole unix/linux platform and if this is a stupid question, please excuse me for asking.