Have you just upgraded to Ubuntu 11.10 and now getting the Ã¢â‚¬Å“Waiting for network configurationÃ¢â‚¬Â message followed by Ã¢â‚¬Å“Waiting up to 60 seconds more for networkÃ¢â‚¬Â? This then might be accompanied by a black blank screen or screen with text “Booting Ubuntu without full network configurations”?
[update] IÃ¢â‚¬â„¢ve updated this post to reflect the copy step mentioned in the bug post below is surplus as /run is mounted tmpfs Ã¢â‚¬â€œ the refined steps are below. The fix is removing the old /var/run and /var/lock then pointing those old locations to /run and /run/lock respectively. IÃ¢â‚¬â„¢m suspecting this bug only comes about after an upgrade from your existing session (e.g. apt-get dist-upgrade) where it must have trouble removing these directories because existing services have files needed in there.
The bug is here (https://bugs.launchpad.net/ubuntu/+source/sysvinit/+bug/858122) and the fix is based on this: https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/811441/comments/24 :
Hit Ctrl+Alt+F1 at the blank screen to get you to a non-X terminal (tty1)
Login in with your username and password
Change to root with: sudo -i and enter your password
IÃ‚Â hope you have understand file ownership and permissions from my previous postÃ‚Â Understanding File Permissions Linux. In this post you will learn how to set file permissions in linux.
Change the owner of a file in linux:
You can change the owner and group of a file or a directory with theÃ‚Â chownÃ‚Â command. Please, keep in mind you can do this only if you are the root user or the owner of the file.
Set the file’s owner: $Ã‚Â chown username somefile
After giving this command, the new owner of a file calledÃ‚Â somefileÃ‚Â will be the userÃ‚Â username. The file’s group owner will not change. Instead of a user name, you can also give the user’s numeric ID here if you want.
You can also set the file’s group at the same time. If the user name is followed by a colon and a group name, the file’s group will be changed as well. $Ã‚Â chown username:usergroup somefile
After giving this command,Ã‚Â somefile‘s new owner would be userÃ‚Â usernameÃ‚Â and the groupÃ‚Â usergroup.
You can set the owner of a directory exactly the same way you set the owner of a file: $Ã‚Â chown username somedir
Note that after giving this command, only the owner of theÃ‚Â directoryÃ‚Â will change. The owner of the filesÃ‚Â insideÃ‚Â of the directory won’t change.
In order to set the ownership of a directory and all the files in that directory, you’ll need theÃ‚Â -RÃ‚Â option: $Ã‚Â chown -R username somedir
Here, R stands forÃ‚Â recursiveÃ‚Â because this command will recursively change the ownership of directories and their contents. After issuing this example command, the userusernameÃ‚Â will be the owner of the directoryÃ‚Â somedir, as well as every file in that directory.
Tell what happens:
$Ã‚Â chown -v username somefile
changed ownership of 'somefile' to username
Here, v stands forÃ‚Â verbose. If you use theÃ‚Â -vÃ‚Â option,Ã‚Â chownÃ‚Â will list what it did (or didn’t do) to the file.
The verbose mode is especially useful if you change the ownership of several files at once. For example, this could happen when you do it recursively:
$Ã‚Â chown -Rv username somedir
changed ownership of 'somedir/' to username
changed ownership of 'somedir/boringfile' to username
changed ownership of 'somedir/somefile' to username
As you can see,Ã‚Â chownÃ‚Â nicely reports to you what it did to each file.
Change Group of a file in Linux:
In addition toÃ‚Â chown, you can also use theÃ‚Â chgrpÃ‚Â command to change the group of a file or a directory. You must, again, be either the root user or the owner of the file in order to change the group ownership.
chgrpÃ‚Â works pretty much the same way asÃ‚Â chownÃ‚Â does, except it changes the file’s user group instead of the owner, of course. $Ã‚Â chgrp usergroup somefile
After issuing this command, the fileÃ‚Â somefileÃ‚Â will be owned by a user groupÃ‚Â usergroup. Although the file’s group has changed toÃ‚Â usergroup, the file’s owner will still be the same.
The options of usingÃ‚Â chgrpÃ‚Â are the same as usingÃ‚Â chown. So, for example, theÃ‚Â -RÃ‚Â andÃ‚Â -vÃ‚Â options will work with it just like they worked withÃ‚Â chown:
$Ã‚Â chgrp -Rv usergroup somedir
changed group of 'somedir/' to usergroup
changed group of 'somedir/boringfile' to usergroup
changed group of 'somedir/somefile' to usergroup
chownÃ‚Â nicely reports to you what it did to each file.
I hope you have understand file ownership and permissions from my previous post Understanding File Permissions Linux. In this post you will learn how to set file permissions in linux.
Setting File Permissions in Linux – Symbolic mode:
You can set file permissions with theÃ‚Â chmodÃ‚Â command. Both the root user and the file’s owner can set file permissions.Ã‚Â chmodÃ‚Â has two modes, symbolic and numeric.
The symbolic mode is pretty easy to remember. First, you decide if you set permissions for the user (u), the group (g), others (o), or all of the three (a). Then, you either add a permission (+), remove it (-), or wipe out the previous permissions and add a new one (=). Next, you decide if you set the read permission (r), write permission (w), or execute permission (x). Last, you’ll tellÃ‚Â chmodÃ‚Â which file’s permissions you want to change.
Let’s have a couple of examples. Suppose we have a regular file calledÃ‚Â testfile, and the file has full access permissions for all the groups (long directory listing would show-rwxrwxrwxÃ‚Â as the file’s permissions).
Wipe out all the permissions but add read permission for everybody: $Ã‚Â chmod a=r testfile
After the command, the file’s permissions would beÃ‚Â -r--r--r--
Add execute permissions for group: $Ã‚Â chmod g+x testfile
Now, the file’s permissions would beÃ‚Â -r--r-xr--
Add both write and execute permissions for the file’s owner. Note how you can set more than one permission at the same time: $Ã‚Â chmod u+wx testfile
After this, the file permissions will beÃ‚Â -rwxr-xr--
Remove the execute permission from both the file’s owner and group. Note, again, how you can set them both at once: $Ã‚Â chmod ug-x testfile
Now, the permissions areÃ‚Â -rw-r--r--
As a summary, have a look at this quick reference for setting file permissions in symbolic mode:
What to do?
add this permission
remove this permission
set exactly this permission
Setting File Permissions in Linux – Numeric mode:
The other mode in whichÃ‚Â chmodÃ‚Â can be used is the numeric mode. In the numeric mode, the file permissions aren’t represented by characters. Instead, they are represented by a three-digit octal number.
To get the permission bits you want, you add up the numbers accordingly. For example, the rwx permissions would be 4+2+1=7, rx would be 4+1=5, and rw would be 4+2=6. Because you set separate permissions for the owner, group, and others, you’ll need a three-digit number representing the permissions of all these groups.
Let’s have an example.
$Ã‚Â chmod 755 testfile
This would change theÃ‚Â testfile‘s permissions toÃ‚Â -rwxr-xr-x. The owner would have full read, write, and execute permissions (7=4+2+1), the group would have read and execute permissions (5=4+1), and the world would have the read and execute permissions as well.
Let’s have another example:
$Ã‚Â chmod 640 testfile
In this case,Ã‚Â testfile‘s permissions would beÃ‚Â -rw-r-----. The owner would have read and write permissions (6=4+2), the group would have read permissions only (4), and the others wouldn’t have any access permissions (0).
The numeric mode may not be as straightforward as the symbolic mode, but with the numeric mode, you can more quickly and efficiently set the file permissions. This quick reference for setting file permissions in numeric mode might help:
This content is copied from http://www.tuxfiles.org/linuxhelp/filepermissions.html