Please, i am using Ubuntu 11.10 and I made a mistake in system directories, changed permissions of all content to 777. I was trying to correct some files, but i cant fix all directories and files. Can I return to default permissions??
Thanks.
Please, i am using Ubuntu 11.10 and I made a mistake in system directories, changed permissions of all content to 777. I was trying to correct some files, but i cant fix all directories and files. Can I return to default permissions??
Thanks.
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
fdisk, format, reinstall, doo dah, doo dah. i.e.
root@loki:~# find /etc/ -type f -exec ls -al {} \; | awk '{print $1}' | sort | uniq
-r--r-----
-rw-------
-rw-r-----
-rw-r--r--
-rw-rw-r--
-rwxr-xr-x
root@loki:~# find /etc/ -type d -exec ls -al {} \; | awk '{print $1}' | sort | uniq
drwx------
drwxr-s---
drwxr-xr-x
drwx--x---
lrwxrwxrwx
-r--r-----
-rw-------
-rw-r-----
-rw-r--r--
-rw-rw-r--
-rwxr-xr-x
some blanket chmod'ing and chowning in /etc is not going to fix this. you've made a proper mess of things, and a reinstall is the quickest and cleanest way to fix it RIGHT. any thing else, short of restoring content or images from backups is both a waste of time and incomplete.
chalk it up to experience (i've certainly hosed many an install learning), and move forward.
Let's do this from the terminal
1) sudo -i
2) sudo chown root.root /etc/*
3) sudo chmod 755 /etc/*
4) exit
In case you need to reset the permissions on sudoers, the permissions should be set to:
1) chmod 440 /etc/sudoers
It is owned by root.root
I think most file system have permission of 755 for folders and 644 for files except for /bin which has executable files with root as owner.Hope this helps...
chown: can not get the target referenced by "/ etc / blkid.tab": File or directory not found
--->> Sorry, not working!
– Daniel Accorsi Mar 27 '12 at 14:30