On Sat, Aug 15, 2009 at 10:01 PM, tanjir <[email protected]> wrote: > Very good question. We often tell users to run commands, but I guess most > times users don't really know what they mean. > So, in the proposed solution, you were asked to run these two commands: > 1. sudo chmod 755 netbeans-6.7.sh > sudo: this command is used before other commands. For example, here, "chmod > 755 something.sh" is a command by itself. But the command runs as current > user. If you add sudo before this command, it will run as root user. Just > for fun create a file called foo.txt. And copy like following "sudo cp > foo.txt bar.txt" (It simply copies foo.txt file to bar.txt). Then type "ls > -al" (it lists all the files and related information). You will see the > owner of bar.txt is root. Now you can't remove bar.txt by "rm bar.txt", you > have to use "sudo rm bar.txt". Once you remove try the same cp command > without sudo (e.g. cp foo.txt bar.txt) and do "ls -al" and see the owner now > is you.
Also this above section clearly tells you the danger it can create being the root user all the time. You are creating all root owned files. > > chmod: stands for change mode of the file. Using chmod you can modify the > file permission. By default in ubuntu, files don't have executable > permission, so here you ar adding executable permission. To know more about > chmod, read this article: http://ss64.com/bash/chmod.html You also might be allowing everything to be executable. Which makes your system extremely vulnerable! -- Ubuntu Bangladesh | http://ubuntu-bd.org [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bd
