Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

Rep: Reputation: 31
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
LQ Guru
Registered: Feb 2003
Location: Mineral, Virginia
Distribution: Debian 8
Posts: 7,880

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
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
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
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
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31

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
Registered: Jun 2008
Posts: 405

Original Poster
Rep: Reputation: 31
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).


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:25 PM.

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