Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am new to Ubuntu. I recently changed all permissions of the /etc directory in order to edit the hosts file. After that, I realized it was a big mistake. I'm also running Ubuntu along side windows7 (dual boot). Since I changed those permissions, I had to re install Ubuntu because I was not able to use sudoers. Is my windows 7 OS affected by the command I executed?

share|improve this question
    
Captain Hindsight says: You could have booted from LiveCD, mounted the drive your faulty Ubuntu is on an set the permissions right. 5 min - no reinstall. Maybe that helps next time :D –  con-f-use Aug 1 '11 at 12:45
    
By the way, Ryan, you should NEVER modify the permissions on /etc. next time, to edit hosts, do gksudo gedit /etc/hosts or something along those lines in order to edit the hosts file as superuser. You should never need to change the global permissions on /etc –  Thomas W. Aug 1 '11 at 13:00
    
It's okay, we've all done this at some point - whether on purpose or accident. –  Marco Ceppi Aug 1 '11 at 13:17

3 Answers 3

Windows 7 is not affected by any changes you make on a Linux filesystem. In fact, Windows doesn't even know they exist.

share|improve this answer

Windows 7 and Ubuntu are generally installed in a dual boot configuration as separate individual partitions. When you are working on Windows 7, the linux files are not affected. Subsequently, using Linux will not affect Windows 7. Even if Windows 7 were mounted in teh Linux environment, it would not be affected in the least because it was not in the /etc folder which you modified. Read my comment to your original question for important info, though, because you shouldn't be modifying global permissions in /etc like you did.

share|improve this answer
    
Exactly, modifying permissions in /etc is something which should be never done for a user so he can edit files then there, the reason of the "default permissions" (as they are) exactly the case to avoid that a regular user can modify a file there (sometimes even not to able to read it, like with /etc/shadow). If someone needs to edit a file there, the solution is to raise his own priv for the operation to be succeeded, not to "weaken" the permission of files/dirs there so they can do it ... –  LGB Aug 1 '11 at 13:47
    
i.e. using sudo <command>, such as sudo nano /etc/hosts or sudo vim /etc/hosts, or gksudo gedit /etc/hosts –  Thomas W. Aug 1 '11 at 13:48

In any case, I will always say that whatever you do about reinstalling Ubuntu or fixing an OS, the first thing to do is a full backup or all your data on all partitions, even if you know that you will not touch Windows partitions. Better safe than sorry.

Installing Ubuntu over an existing Ubuntu installation will not hurt Windows a bit. Linux is a multi-boot-friendly operating system and installing it will only redo its own partition and rewrite the boot sector to include all operating systems found on the disk, be it Windows, Linux, FreeBSD, etc. Windows will not even notice that Linux was changed or reinstalled.

The same thing cannot be said if you reinstall Windows. Windows, when re-installed will only "scan" for existing Windows XX installations and will include those under the NT boot menu. This will override the boot sector, and all Linux partitions will be unavailable, although untouched. There are well-documented pages on how to restore Linux booting.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.