Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.