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.
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.
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.
|All times are GMT -5. The time now is 07:37 PM.|