SOLVED: Ownership issues in the Home directory

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
Post Reply
Oldfiddler
Level 2
Level 2
Posts: 59
Joined: Wed Mar 26, 2014 5:52 am

SOLVED: Ownership issues in the Home directory

Post by Oldfiddler » Fri Apr 27, 2018 4:24 am

I hope I've chosen the right board for this topic. If not, perhaps the administrators would move it.

I am running Mint 17.3 Cinnamon. Recently, the boot process has been interrupted by this warning message: "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 permissions. User's $HOME directory must be owned by user and not writable to other users." I can skip through the warning and nothing bad seems to happen, but it's a nuisance having this two-stage boot. And it would be nice to get things right.

I have little idea how this problem has arisen, unless I have done something stupid (always possible!) in copying files from this computer to a laptop, and vice versa.

Please give me some suggestions (simply expressed!) on how to put this right. Thanks!

John
Last edited by Oldfiddler on Fri Apr 27, 2018 12:21 pm, edited 1 time in total.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. » Fri Apr 27, 2018 5:56 am

The error message about .dmrc is not an ownership problem, but a permission problem.

To solve it, enter this in a terminal:

Code: Select all

chmod 600 .dmrc

Oldfiddler
Level 2
Level 2
Posts: 59
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler » Fri Apr 27, 2018 6:24 am

Thanks Cosmo. I tried that and then did a restart - the same warning came up, but I'd lost the mouse. I then did a physical restart and saw a screen I don't remember before, offering a choice of 17.3 generic, 17.3 recovery mode and a couple of others. I chose the generic and up came the warning again. Any other ideas?

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. » Fri Apr 27, 2018 6:39 am

Beforehand: What does this mean?
Oldfiddler wrote:
Fri Apr 27, 2018 6:24 am
I then did a physical restart
Pressing and holding the power key?

The cold reset of a hanging computer will sooner or later end in a damaged file system with the consequence of possible data loss.
This is the method to restart an otherwise not reacting computer:
Press and hold the alt key and the print key. Whilst still holding both keys pressed enter those letters one after one with a little break between them: r e i s u b. After the last letter the computer will immediately reboot without risking the file system. You can replace the letter b with the letter o, if you want to shut down instead of rebooting.

Back to the problems:

We will now check, if there are really ownership problems in your account:
Mark the following command and press ctrl-c

Code: Select all

find $HOME ! -user $USER -type f
open a terminal and press ctrl-shift-V
Mark the complete result inclusive the command with the mouse and press ctrl-shift-C
In the forum click the Code-button (looks like </>) above the text edit box, than press ctrl-v.

Report in case, that there is no output.

Oldfiddler
Level 2
Level 2
Posts: 59
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler » Fri Apr 27, 2018 8:42 am

Beforehand: What does this mean?
Oldfiddler wrote: ⤴Fri Apr 27, 2018 11:24 am
I then did a physical restart
Pressing and holding the power key?
My computer has a narrow reset button next to the power button - I used this to restart. I'd already closed all the systems before the first restart, and so the only thing open was the warning message.

The result of your suggested input is:
[codejohn@john-EP35-DS3R ~ $ find $HOME ! -user $USER -type f
/home/john/.local/share/Trash/files/cupswrapperHL1250-1.0.2-1.i386.deb
/home/john/.local/share/Trash/files/hl1250lpr-1.1.2-1a.i386.deb
/home/john/.local/share/Trash/files/uninstaller_HL1250
/home/john/.local/share/Trash/files/hl1250lpr-1.1.2-1.i386.deb
/home/john/.local/share/Trash/files/cupswrapperHL1250-1.0.2-1a.i386.deb
/home/john/Downloads/hll2340dlpr-3.2.0-1a.i386.deb
/home/john/Downloads/uninstaller_HLL2340D
/home/john/Downloads/hll2340dcupswrapper-3.2.0-1a.i386.deb
john@john-EP35-DS3R ~ $
][/code]

John

User avatar
Flemur
Level 15
Level 15
Posts: 5909
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Ownership issues in the Home directory

Post by Flemur » Fri Apr 27, 2018 9:22 am

Cosmo. wrote:
Fri Apr 27, 2018 5:56 am
The error message about .dmrc is not an ownership problem, but a permission problem.
To solve it, enter this in a terminal:

Code: Select all

chmod 600 .dmrc
Should that be "644" ?

Code: Select all

chmod 644 .dmrc
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

Hoser Rob
Level 11
Level 11
Posts: 3973
Joined: Sat Dec 15, 2012 8:57 am

Re: Ownership issues in the Home directory

Post by Hoser Rob » Fri Apr 27, 2018 9:25 am

Oldfiddler wrote:
Fri Apr 27, 2018 8:42 am
... My computer has a narrow reset button next to the power button - I used this to restart. ...
Dear God :shock: . That's even more dangerous than a hard shutdown using the power button.

You don't hear this as much as you used to because hardware reset buttons are less common, buit Linux users used to be commonly advised to cover up their reset button with something so it couldn't be used. As I'm advising right now.

Oldfiddler
Level 2
Level 2
Posts: 59
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler » Fri Apr 27, 2018 9:38 am

Hoser Rob wrote:
Fri Apr 27, 2018 9:25 am
Oldfiddler wrote:
Fri Apr 27, 2018 8:42 am
... My computer has a narrow reset button next to the power button - I used this to restart. ...
Dear God :shock: . That's even more dangerous than a hard shutdown using the power button.

You don't hear this as much as you used to because hardware reset buttons are less common, buit Linux users used to be commonly advised to cover up their reset button with something so it couldn't be used. As I'm advising right now.
I hear your message! It is of course an old machine.

Oldfiddler
Level 2
Level 2
Posts: 59
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler » Fri Apr 27, 2018 9:43 am

Flemur wrote:
Fri Apr 27, 2018 9:22 am
Cosmo. wrote:
Fri Apr 27, 2018 5:56 am
The error message about .dmrc is not an ownership problem, but a permission problem.
To solve it, enter this in a terminal:

Code: Select all

chmod 600 .dmrc
Should that be "644" ?

Code: Select all

chmod 644 .dmrc
Perhaps it should, but the revised script hasn't removed the warning message. :(

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. » Fri Apr 27, 2018 9:46 am

The output for my command does not show anything, what appears as related (although not remembered error messages and choices like "couple of others" are not really good for investigation.

Repair the wrong ownership:
Mark the following command completely and make sure, that you do not miss any sign, than press ctrl-c

Code: Select all

find /home/$SUDO_USER ! -user $SUDO_USER -exec chown $SUDO_USER:$SUDO_USER '{}' \;
Open a terminal and enter

Code: Select all

sudo -i
and press the Enter-key; you get prompted for your password, enter it.
Now still in the same terminal press ctrl-shift-V
Run this command and wait until it has finished. It does not produce a readable output.
Press twice ctrl-d
Immediately log off and back into your account.

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. » Fri Apr 27, 2018 9:52 am

Flemur wrote:
Fri Apr 27, 2018 9:22 am
Cosmo. wrote:
Fri Apr 27, 2018 5:56 am
The error message about .dmrc is not an ownership problem, but a permission problem.
To solve it, enter this in a terminal:

Code: Select all

chmod 600 .dmrc
Should that be "644" ?

Code: Select all

chmod 644 .dmrc
You hit a valid point. At first: I did really mean 600, not 644.

There is one thing, where I do not have an explanation. The error message says indeed 644. But if you look into a freshly created user account, than you will find, that Mint (I assume Ubuntu also) set the permissions to 600. Don't ask me why there is this difference, I don't know. But fact is, that there is no reason, why others than the owner should have any permission at all and that with the default 600 there comes never such an error message. So advised 600 with the intention to get the OP at the safe side.

Oldfiddler
Level 2
Level 2
Posts: 59
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler » Fri Apr 27, 2018 10:27 am

Cosmo. wrote:
Fri Apr 27, 2018 9:46 am
The output for my command does not show anything, what appears as related (although not remembered error messages and choices like "couple of others" are not really good for investigation.

Repair the wrong ownership:
Mark the following command completely and make sure, that you do not miss any sign, than press ctrl-c

Code: Select all

find /home/$SUDO_USER ! -user $SUDO_USER -exec chown $SUDO_USER:$SUDO_USER '{}' \;
Open a terminal and enter

Code: Select all

sudo -i
and press the Enter-key; you get prompted for your password, enter it.
Now still in the same terminal press ctrl-shift-V
Run this command and wait until it has finished. It does not produce a readable output.
Press twice ctrl-d
Immediately log off and back into your account.
I followed your instructions precisely. I'm afraid the same warning message came up again. Can I tell you anything about ownership/ permissions in the .dmrc file which would help pin it down?

John

User avatar
smurphos
Level 6
Level 6
Posts: 1140
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher...

Re: Ownership issues in the Home directory

Post by smurphos » Fri Apr 27, 2018 11:15 am

Cosmo. wrote:
Fri Apr 27, 2018 9:52 am
Flemur wrote:
Fri Apr 27, 2018 9:22 am
Should that be "644" ?
You hit a valid point. At first: I did really mean 600, not 644.
This page notes that 644 or 600 are OK.

https://help.ubuntu.com/community/dmrcErrors

Hoser Rob
Level 11
Level 11
Posts: 3973
Joined: Sat Dec 15, 2012 8:57 am

Re: Ownership issues in the Home directory

Post by Hoser Rob » Fri Apr 27, 2018 11:24 am

Oldfiddler wrote:
Fri Apr 27, 2018 9:38 am
Hoser Rob wrote:
Fri Apr 27, 2018 9:25 am
Oldfiddler wrote:
Fri Apr 27, 2018 8:42 am
... My computer has a narrow reset button next to the power button - I used this to restart. ...
Dear God :shock: . That's even more dangerous than a hard shutdown using the power button.

You don't hear this as much as you used to because hardware reset buttons are less common, buit Linux users used to be commonly advised to cover up their reset button with something so it couldn't be used. As I'm advising right now.
I hear your message! It is of course an old machine.
I forgot to mention a better way to do shut down when the system's hung. Hold down both the Alt and PrtSc/SysReq keys. Then type, slowly, R, E, I, S, U, and O. Case doesn't matter. To restart instead of shutting down do the same thing but type REISUB instead.

Oldfiddler
Level 2
Level 2
Posts: 59
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler » Fri Apr 27, 2018 12:21 pm

smurphos wrote:
Fri Apr 27, 2018 11:15 am

This page notes that 644 or 600 are OK.

https://help.ubuntu.com/community/dmrcErrors
Thank you for this link, smurphos. I went through it step by step and the warning message now seems to have disappeared. :D I'll mark this thread as solved, Thanks to all for your suggestions!

John

User avatar
phd21
Level 16
Level 16
Posts: 6535
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Ownership issues in the Home directory

Post by phd21 » Fri Apr 27, 2018 1:32 pm

HI Oldfiddler, & Anyone Else Interested in this,

FYI: If you want to make sure everything in your "home" folder has the correct permissions for your user as they should, you could use one of the commands below which is also in the link provided.

Code: Select all

sudo chown -R $USER:$USER /home/$USER
Or use this command replacing "username" with your actual user name

Code: Select all

sudo chown -R username:username /home/username
...
Phd21: Mint KDE 17.3 & 18.3, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

Cosmo.
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. » Fri Apr 27, 2018 3:42 pm

smurphos wrote:
Fri Apr 27, 2018 11:15 am
This page notes that 644 or 600 are OK.

https://help.ubuntu.com/community/dmrcErrors
From the linked page:
If you view the permissions after logging back in, you will find the system has changed the permissions to "600" ( -rw------ ). You can substitute "600" in this command if you wish.
This matches with that, what I wrote above: In a new account the permission for this file gets set to 600. Actually this file does not created during creation of the account, but at the first log in.
I cannot see the sense to set permission (if needed for correction) to 644, if the system changes them anyway to 600. Consequently I stay with my advice for 600. Of course I could write 600 or 644, but with guarantee this would create new confusion.

Post Reply

Return to “Other topics”