LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-03-2010, 10:25 AM   #1
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Rep: Reputation: 44
.dmrc permission error at login ramdisk for /home


hey, i'm trying to build a system for a client running linuxmint

i've managed to set up a ramdisk setup for the /home partition so that the directory is wiped every reboot, however when i restore my backup of the settings i get that dreaded $HOME/.dmrc is being ignored box pop up, i can hardly hand this over to the client as their intro to linux so could someone possibly help me?

i have detailed the configuration here http://person1873.myftp.org/wiki/ind...et_every_login
 
Old 04-10-2010, 06:38 PM   #2
in_texas_dallas
Member
 
Registered: Sep 2009
Location: DFW
Distribution: Debian Lenny
Posts: 38

Rep: Reputation: 17
The only thing I can say about this is it happened once when I accidentally chown'ed the whole directory -R to 777 [big no no]

So, maybe you need to manually change the permissions of the whole directory to what it's supposed to be. I think you can do that when you mount it [without using chown].

Otherwise, it *may* give you another reason that will help you pinpoint the problem.

Hope this helps.
 
Old 04-11-2010, 11:55 AM   #3
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Original Poster
Rep: Reputation: 44
thankyou for your reply, however as the permissions are reset every reboot i have to manually chown and chmod the direcotories, if you'd read the wiki entry i linked to then you would see this.
 
Old 04-11-2010, 12:43 PM   #4
in_texas_dallas
Member
 
Registered: Sep 2009
Location: DFW
Distribution: Debian Lenny
Posts: 38

Rep: Reputation: 17
Lightbulb

Yes, but the problem is exactly what the problem is and nothing else. So, my response remains the same: you have a problem with the permissions.

Quote:
mkfs.ext2 -q /dev/ram1 63400
mount /dev/ram1 /home
cp -R -p /backup/home /
chown -R username:usergroup /home/username
chmod -R 755 /home/username
chmod 644 /home/username/.dmrc

[edit] Problems

* At login an error message appears

file $HOME/.dmrc is being ignored
file should have 644 permissions
and home directory should be owned
by user and not writable to others
If it means anything, I had this exact problem and solved it by doing a chown of my entire directory, to either 644 or 744. It should be 744 and I think that is what I did.

I think your problem started the exact way mine did. I copied a directory that was owned by another user into a directory owned by another user. You may not realize that's what you've done, but in fact it may be what your OS thinks you are doing.

Quote:
--from=CURRENT_OWNER:CURRENT_GROUP
change the owner and/or group of each file only if its current
owner and/or group match those specified here. Either may be
omitted, in which case a match is not required for the omitted
attribute.
Quote:
chown -R username:usergroup /home/username
Try:
Code:
chown -r --from=currentuser:currentgroup /home/username
Not sure if that would make a difference.

Also, I did take a look at the commands, and they could be written better.

From what I understand, it should just be necessary to make a backup of the /home/username directory NOT the entire home directory. This may not seem important, but I'll invoke Occam's razor. One less assumption for us to worry about.

It may be necessary to rewrite those commands.

so try this

Code:
mkfs.ext2 -q /dev/ram1 63400 
mount /dev/ram1 /home/username
cp -R -p /backup/home/username /home/username
sudo chown -R --from=currentuser:currentgroup /home/username
sudo chmod -R 755 /home/username
sudo chmod 644 /home/username/.dmrc
OK, just to briefly explain my changes, We are now mounting /dev/ram1 directly to the user who is logging in [assumes one user, though this could be fairly easily configured to do this for the current user, as in multiple users, whichever is logging in now].

We also copy ONLY the current user's directory from the backup to the /home/username
I made this command more specific. That is how it is read in the manpages. Once again, Occam's razor. I can't be certain that does the same thing, so I am eliminating the need to make that assumption.

BTW, if we assumed all the files were in place where they needed to be [properly mounted and copied] then the original chown commands SHOULD have done the trick. Which means that files are NOT where they need to be or there is some other problem with the mounting that the OP [on the other forum] did not take into account.

I changed the copy commands [and hopefully the chown] enough to see if it can be so easily solved or if you are going to have to do more research into ram drives.
 
Old 04-12-2010, 09:29 AM   #5
Person_1873
Member
 
Registered: Sep 2007
Location: Australia
Distribution: Gentoo / Debian / Rasbian / Proxmox
Posts: 519

Original Poster
Rep: Reputation: 44
ok, after considering what you've said and the changes you have made, i have concluded that my implementation is better as it allows for multiple accounts, however you still have not solved the issue, if you looked i had already made the permissions and ownership correct, the question i am asking is more along the lines of "is there something i have overlooked perhaps in the mounting options?" i must also note that the .dmrc file error does not appear if you log out then back in, which gives me the impression that the .dmrc file is having to be created on login and is not being coppied over from the backup.

also the -p option used with the cp command preserves ownership and permissions so the chown and chmod commands used in the script should really be overkill

I am also the OP on the other wiki

Last edited by Person_1873; 04-12-2010 at 09:43 AM.
 
Old 04-13-2010, 12:12 PM   #6
in_texas_dallas
Member
 
Registered: Sep 2009
Location: DFW
Distribution: Debian Lenny
Posts: 38

Rep: Reputation: 17
Lightbulb

Try making a directory on you computer. Unless you are running root, you will need to sudo that.
Code:
sudo mkdir /testingdirectory
Then
Code:
ls -A -l /
Note the owner of this directory
Compare with
Code:
ls -A -l /home
Then
Code:
sudo chown 744 /testingdirectory
Then
Code:
ls -A -l /
Compare again with the permissions of your home directory.

now try this:

EDIT: This is your solution, I'll let you make changes to your own lines of code since you seemed unwilling to try solutions previously.

Once you see what the username is and usergroup is for your HOME directory [read: home/username], you can do this

Code:
sudo chown username:usergroup /testingdirectory
NOTE, usually username and usergroup are the same for a user's home directory.

You can chown 744 or 644 afterwards.

Last edited by in_texas_dallas; 04-13-2010 at 12:16 PM.
 
  


Reply

Tags
home, mint, ramdisk, reset



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
“User’s $HOME/.dmrc” file is being ignored. freezykid Linux - General 7 07-16-2014 03:52 AM
No .dmrc found in home after installation LAN-Dominator.nl Ubuntu 1 08-21-2009 02:28 AM
.dmrc in ntfs (cannot change permission to 644) jiatong Linux - General 2 05-14-2009 01:45 AM
cannot write $(HOME).dmrc file home is on a seperate partition Person_1873 Linux - Newbie 5 12-07-2008 01:41 PM
user's $HOME/.dmrc file being ignored controlchannel Ubuntu 1 09-07-2007 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration