Crashzor wrote:For you how don't understand it put it in a file .sh
chmod 777 the file.
I don't want to be a nitpick, but: don't even get used to chmodding files 777.
If you own the file, all that matters is that
you can do everything with it - that is, 700 suffices. Useful chmod values are:
- 600 - you can read/write, nobody else can do anything
- 640 - you can read/write, your group can read
- 644 - you can read/write, everyone can read
- 660 - you and your group can read/write, nobody else can do anything
- 664 - you and your group can read/write, everyone can read
- 666 - everyone can read and write
Additionally, shell scripts and programs need to be marked as executable so that the OS knows it is a script/program. This is basically done by replacing all fours by fives and all sixes by sevens. The access rights in the list would then be: 700, 750, 755, 770, 775, 777.
Usually, you don't want to give more access rights than 644 for regular files and 755 for directories and programs/scripts. These rights mean "everyone can read/execute/enter, nobody except you can write".
Of course, all this does not matter if you are the only one who uses the computer - but if you use "wrong" chmod values in a multi-user system like at university or on hoster where you can run a dedicated server, you can get severely screwed, that is, "owned" by others who access the same computer.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again
You can vary the number of "MS", so you can clearly see it's MS which is causing it.