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 read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Oldfiddler
Level 2
Level 2
Posts: 97
Joined: Wed Mar 26, 2014 5:52 am

SOLVED: Ownership issues in the Home directory

Post by Oldfiddler »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. »

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: 97
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler »

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 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. »

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: 97
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler »

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 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Ownership issues in the Home directory

Post by Flemur »

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?
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Ownership issues in the Home directory

Post by Hoser Rob »

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.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
Oldfiddler
Level 2
Level 2
Posts: 97
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler »

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: 97
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler »

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 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. »

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 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. »

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: 97
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler »

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 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Ownership issues in the Home directory

Post by smurphos »

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
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Ownership issues in the Home directory

Post by Hoser Rob »

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.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
Oldfiddler
Level 2
Level 2
Posts: 97
Joined: Wed Mar 26, 2014 5:52 am

Re: Ownership issues in the Home directory

Post by Oldfiddler »

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
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Ownership issues in the Home directory

Post by phd21 »

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 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Ownership issues in the Home directory

Post by Cosmo. »

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.
Locked

Return to “Other topics”