LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2009, 03:57 PM   #1
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Rep: Reputation: 30
restored from tape, but having permissions problems


The strangest thing is that I'm having problems in directories that weren't restored from tape. For example, the openwebmail directory in /usr seemed to lose it's group writing privelege so the mail account couldn't use it for openwebmail.

Now I'm having trouble with pine/sendmail and god knows what else. Whatever I did I doubt there's an easy fix.. but I'd like to at least figure out what I did.

While I was restoring from tape, I was in single user mode which mounted / as read only initially. /usr wasn't mounted at all. I mounted them manually in read/write mode and restored the bad drive and partitions (/local /scratch /soft and /var). Everything seemed to go fine, so I don't know how the permissions could have changed.
 
Old 01-02-2009, 04:24 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 272Reputation: 272Reputation: 272
When you are in single user mode you are running as root. Any files that you create will be owned by root. You can get around that by telling the program you are restoring with to preserve permissions. Actually you have to preserve permissions on both the backup and the restore. For examples of what I am talking about look in the man pages for the tar command and check out the -p, --same-permissions, and --preserve-permissions options. Look at the man pages for the cp command and check out the -a, -p, and --preserve options. Look at the man pages for rsynch and check out the -a and -p options.

I would like to repeat that if you are preserving ownership then you must do so on both the backup and the restore. If you backup everything as root without saving permissions then the restore will have root permissions regardless of what you tell the command you restore with.

----------------
Steve Stites
 
Old 01-02-2009, 04:40 PM   #3
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 30
You're saying that everything I restored is going to be owned by root:root whether it should be or not?

I just checked however, and that is not the case (thank god!)

I archived using:

tar -cvf /dev/nsa0 /var

and restored using:

tar -xvf /dev/nsa0 var

I shouldn't have had the / before var when archiving, but the tar program said it was removing the leading slashes for me, and the restore seems to have gone just fine.

Got any other ideas or comments on this?

By the way, my particular problem at the moment is that sendmail doesn't want to send when I use pine (though it works fine when I use open web mail to send; I assume OWM is sending via sendmail, but I'm not sure).
 
Old 01-02-2009, 04:50 PM   #4
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 30
ok:

the /var/spool/clientmqueue directory apparently needed permissions as follows:

rwxrwx--- however, it had rwxr-x---

but the owner and group were preserved properly as smmsp

It seems like write permissions just disappeared on a lot of public directories that needed them, but nothing else was lost. What a mess.
 
Old 01-02-2009, 09:46 PM   #5
davidstvz
Member
 
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 30
Just to make sure this is perfectly clear:

1) One of these weird permissions problems occured in the /usr partition which is NOT on one of the hard drives that failed. The only thing I did with this harddrive was manually mount and unmount it a few times using the following commands:

mount -uw /usr
mount -ur /usr
umount /usr

2) The problem also occured on the /var partition which is one of the ones I restored. I didn't use -p when I tarred or untarred, but all group assignments and permissions seemed to be retained anyway... except the group write permissions on a few folders as noted.

In fact, I think all of the problems so far have been that group write permissions simply vanished on each folder where I had a problem. Maybe I accidentally issued a chmod command that had the effect of "chmod g-w" on a big space I didn't intend (I don't recall doing anything other than "chmod g+w" specific files much less anything like "chmod -R g-w /*", but who knows).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Restored Partimage image on a larger partition, problems. Romanus81 Linux - Hardware 1 01-02-2009 12:34 AM
Problems accessing restored Mandriva partition image Jongi Mandriva 2 01-13-2006 05:53 AM
tape back up problems tornatom Linux - Hardware 0 07-11-2005 11:11 AM
nvidia permissions always restored acidjuice Slackware 6 03-15-2005 11:58 AM
Tape drive problems czarherr Linux - Hardware 2 09-22-2004 08:29 PM


All times are GMT -5. The time now is 10:22 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration