Why is it unsafe to browse the web as root?
A lot of people online advised me to never browse the web as root.I can understand why you must not work as root for doing day to day tasks as it is really easy to mess the sytem files up.But would somebody mind explaining what harm could merely browsing the web do?
Also I wish to know why is it unsafe creating a file beginning with ' . ' in the current directory.I thought ' . ' only makes a file hidden. Thanks a lot for your help. |
Quote:
Quote:
|
While running as root, if there are any security flaws in the apps you are running, outsiders can use those to gain access to your system. Sometimes Unix security measures seem to be a bit paranoid, but its always for a reason.
|
Hello. Doing anything as root for day-to-day things is risky. One slip and you could accidentally delete or overwrite a wad of important files and not easily know how to get them back. Web browsers can execute scripts which have the potential to do things to files on your PC, though, admittedly, this is unlikely unless security is broken (if someone has found an exploit.) For example, the same risk exists in Outlook in Windows, which can execute scripts from Spam messages without you knowing it. Causing spyware, etc.
Never heard of '.' (hidden) files being unsecure. |
Here is the exact text:
How to keep from accidenatlly running a Trojan in your shell account. Damian advises "NEVER put '.' (the current working directory or cwd) in your path! If you really want "." in your path, make sure it is the last one. Then, if a Trojan like ls is in your current directory, the _real_ ls will be used first. Set your umask (umask is the command that automatically set permissions on all files you create, unless you specify otherwise) to something more secure than 022, I personally use 077. Never give group or other write access to your directory and be leery of what others can read." For your reading enjoyment, use the commands "man chmod" and "man umask" to get all the gory details. |
That text does not mean that there is a problem with hidden (dot) files. Its pretty self explanatory in my opinion.
|
Iam a newbie user but I understood that chmod and umask part.But what do you mean by not putting ' . ' in your path and how does it affect you.
If possible kindly illustrate with an example. |
Your path is all the directories that can be used will execute files by just typing the file name instead of the whole location. For example, say I have a script in my home folder I want to execute. Without the home folder in the path you have to type ~/myscript. If it's in the path you can just type myscript. Using the period is a shortcut for what ever the current directory is. I can see that adding "." to your path could be a risk, because then some malicious code could get executed easily if it got installed. Otherwise it would have to know the location on your system. In case you want to know what your path is you can type echo $PATH. Also some other directory shortcuts that my be useful in case you don't know are ~ which I already mentioned is your home directory and .. is the directory above the current one.
|
Ok Now I get it thanks for your help.
|
All times are GMT -5. The time now is 09:55 AM. |