Surprise!
Nothing is perfect. Period. Hard to accept and entertaining sometimes. I do not know why, but after installing the fluxbox desktop manager as an alternative to the default XFCE4 desktop of Xubuntu, an error appeared after login:
User's $home/.dmrc file is being ignored. This prevents the default session and language from being saved. File should be owned by user and have 644 permission. User's $home directory must be owned by user and not writable by other user's.
Uhuu?!
What does permission 644 mean?
The keyword here are owner and permission. And the Community Documentation has an explanation.
In Linux and Unix, everything is a file. Directories are files, files are files and devices are files. [...] All of the files on a system have permissions that allow or prevent others from viewing, modifying or executing. The super user “root” has the ability to access any file on the system. Each file has access restrictions with permissions, user restrictions with owner/group association. [...]
Back to my issue:
ls -al
lists all files (-a inclusive the hidden ones like .dmrc) in the directory as an extensive list (-l) showing particularly ownership and permissions:
-rw------- 1 reinhard reinhard 25 2009-07-22 12:11 .dmrc
The easy part is “reinhard reinhard” which means that owner is reinhard (1st “reinhard”) and group is reinhard (2nd “reinhard”), the way it should be.
The permission is the part saying -rw——-. To understand this have a look at the Community Documentation.
| User | permission |
| owner | -rwx------ |
| group | ----rwx--- |
| other | -------rwx |
Thus -rw——- means:
- rw- user may read and write but not execute,
- — group has no permission at all and
- — others have no permission at all, too.
The error log was asking for permission 644. What does that mean then? It is allowed to express the permissions as read, write or execute or as a number.
| Permission | chmod option |
| read | r or 4 |
| write | w or 2 |
| execute | x or 1 |
Combinations of permissions as rwx are then expressed as a sum of r=4, w=2, x=1 equals 7. This means 644 equals rw for owner, r for group and read for others. And is not rw for owner and nothing for group and others.
How to change the permission?
With chmod.
chmod 644 .dmrc
The same reasoning applies for the second point of the error message. The directory $HOME /home/reinhard/ in my case has to be owned by me “reinhard” and must not be writable by others. ls -l /home reveals that permission is drwxrwxrwx (note the “d” denoting that /home/reinhard is a directory). Others have write permission but should not.
chmod o-w reinhard/
meaning others minus - writable.
Surprise.