Visit Jeremy's Blog.
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 11-10-2008, 02:44 PM   #1
Registered: Jul 2008
Posts: 35

Rep: Reputation: 15
can i still recover from rsync mishap


I restored my home directory, and others as well, on my (ubuntu pc) using rsync. Now all sub-directories of home are owned by root and has permissions 777. I seem to have lost the ability to use sudo or su as well.

Can I recover from this? Or am I completely gone?

I used the -avz options when I backed up. That obviously wasnt enough. What other options do I need to retain permissions and ownerships when backing up with rsync?

Any help/suggestions would be much appreciated.

Old 11-10-2008, 03:20 PM   #2
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Typically /home/username is owned by username and its group is either "users" or username, depending on the distro. Not sure about what Ubuntu uses. Permission on these are 700.

The files and directories under these have the same ownership, but will more typically be 755.

You can changes these recursively using chmod and chown using the -R option.

When you say you backed up using -avz, did you restore using -avz also? -a should be sufficient to maintain ownership and permissions.

Try something like

chown -R username:users /home/username
chmod -R 755 /home/username
chmod 700 /home/username

as root (or using sudo).

Edit - what did you do to lose sudo access? You may need to boot a live CD or similar to edit /etc/sudoers.

Last edited by billymayday; 11-10-2008 at 03:24 PM.
Old 11-10-2008, 07:43 PM   #3
Registered: Jul 2008
Posts: 35

Original Poster
Rep: Reputation: 15
Thanks for your help. I was able to get the sudo/su going. The permissions on the sudoers file had been changed during the backup. I was able to change it back.

I had a look at the permissions and ownerships of the backups and all files and directories are 777 and root respectively. I think my system is broken.

I have another Ubuntu system inside Windows (WUBI). Can I replace the broken system with that -- package the WUBI and install it over the broken system? It would be less work, I think, if it can be done.



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
File and settings transfer wizard mishap mpriddy Linux - Software 2 11-09-2008 09:03 PM
Ubuntu mishap tottenhamfan Linux - Newbie 2 09-10-2008 03:55 PM
Graphical Installation Mishap s0n|k Fedora - Installation 4 09-24-2006 10:57 PM
Windows Rsync Upload to Linux Rsync - permissions inspleak Linux - Software 0 10-12-2004 03:49 PM
Partition mishap- OS 5.8 dvong3 Solaris / OpenSolaris 6 10-23-2003 11:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:19 AM.

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