DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Installation and Upgrading

FreeBSD Installation and Upgrading Installing and upgrading FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 3rd February 2009
Crotalus's Avatar
Crotalus Crotalus is offline
New User
 
Join Date: May 2008
Posts: 7
Default Permission problems after restore

After moving the /home and /tmp file systems to a new hard drive I have permission problems. I started with two of the smaller files systems in case I had problems. I get the errors when logged on as a “user”. No problem with “root”. Transfer was done using tar as follows:

I created a partition on a new hard drive called /tmpn and /homen
cd /tmp
tar cvf /storage1/backup/tmp_backup.tar
cd /home
tar cvf/storage1/backup/home_backup.tar
cd /tmpn
tar xpvf /storage1/backup/tmp_backup.tar
cd /homen
tar xpvf/storage1/backup/home_backup.tar
umount /tmp
umount/home
Using disk label rename mount points /tmp to /tmpo and /tmpn to /tmp
Using disk label rename mount points /home to /homeo and /homen to /home
Updated /etc/fstab and rebooted with out any problems
--------------------------------------------------------
ERRORS
--------------------------------------------------------
$ whoami
Keith
drwxr-xr-x 15 root wheel 2048 Feb 3 15:37 tmp
drwxr-xr-x 6 root wheel 512 Feb 3 13:38 home
drwxr-xr-x 20 Keith wheel 1536 Feb 3 15:38 Keith
and a file in my home directory
-rw-r--r-- 1 Keith wheel 2604 Oct 8 2000 README.trim

$ view README.trim
ex/vi: Error: Log file: Permission denied
$

When trying “startx” the following error occurs:

kdeinit: DCOPServer could not be started, aborting.
Warning: connect() failed: : Connection refused
The following installation problem was detected
while trying to start KDE:

Writing to the temp directory (/tmp) failed with
the error 'Permission denied'

KDE is unable to start.
----------------------------------------------------------
All the file permissions appear to be correct. It appears that /tmp may be the problem but I can not find any permissions that are set wrong and what log file would it be having a problem with. The -p option should keep the original file permissions. I have been using tar for backups but have never had the need to do a restore. I have not lost any data as it is still on the old hard drive.

Anybody have any idea where the problem would be? I have three more to go.

Thanks!

Keith
Reply With Quote
  #2   (View Single Post)  
Old 4th February 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

/tmp should be chmod 1777

Code:
drwxrwxrwt  18 root  wheel  1024 Feb  4 10:20 /tmp
Reply With Quote
  #3   (View Single Post)  
Old 5th February 2009
Crotalus's Avatar
Crotalus Crotalus is offline
New User
 
Join Date: May 2008
Posts: 7
Default

DutchDaemon,

Thanks for the reply. I did try 0777 and it worked. My thought was that it would open it to the world. I had tunnel vision thinking what "tar" restored was the correct permissions. One of those quaint and bizarre functions of the system I guess. Something for future reference in the notes. I also see that you put the sticky bit on and that makes sense. Everything now works the way it should.

Thanks!
Reply With Quote
  #4   (View Single Post)  
Old 5th February 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

Please use 1777, not 777. That way only users that put a file in /tmp can delete it. Else everyone can delete any file in /tmp. See chmod(2) and sticky(8).

(posted as clarification for others)

Last edited by DutchDaemon; 5th February 2009 at 02:20 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD backup/restore graudeejs Guides 2 26th February 2010 06:40 AM
Restore OBSD Over SSH revzalot OpenBSD Installation and Upgrading 16 2nd September 2009 06:45 PM
user permission... lumiwa FreeBSD General 12 30th September 2008 02:28 AM
dat 72 one touch restore firstkmh FreeBSD General 0 29th August 2008 03:46 PM
Permission denied delboy FreeBSD Ports and Packages 11 24th May 2008 09:26 PM


All times are GMT. The time now is 10:54 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick