LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-18-2015, 09:54 AM   #16
orhank
LQ Newbie
 
Registered: Dec 2012
Location: Istanbul, Turkey
Distribution: Ubuntu 12.04, Ubuntu 14.04, Solaris 10, Solaris 11, Windows 7 and 8.1
Posts: 23

Rep: Reputation: Disabled

I'm sorry, I missed that.
 
Old 02-19-2015, 11:58 PM   #17
abudy8
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
My supervisor sat with me and did many modifications.
1) He deleted all the copied files to home directories manually
2) Since I used the root. Somehow all users folders permissions changes to root. So He changes user folder one by one to Sudo group

I thought everything is fixed. Now all users are facing issues with login, sending files, and accessing their folders. How can I figure the right permissions for each user?
 
Old 02-20-2015, 12:20 AM   #18
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,184

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
how many users are there? Probably you need to use chown -R or chmod -R, but without a backup you will never be able to restore the original state.
 
Old 02-20-2015, 01:24 AM   #19
abudy8
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
If I have a backup how can I restore the original state?
 
Old 02-20-2015, 01:47 AM   #20
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,184

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
If you had a backup you also could have a backup software to use that backup (it can be as simple as a tar, rsync or similar command)
 
1 members found this post helpful.
Old 02-20-2015, 01:53 AM   #21
abudy8
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
My last backup is from couple of weeks ago. Can I just open the backup .tar file and copy the home folder and paste it back to the server to fix the problem?
 
Old 02-20-2015, 02:03 AM   #22
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,184

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
yes, you can, but you need to take care about the permissions too. I would suggest you to check it first if it really works as expected.
 
Old 02-20-2015, 08:22 AM   #23
abudy8
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
I checked the backup and it seems good. shall I copy them? and if i did is it going to replace the permission too?
 
Old 02-20-2015, 09:54 AM   #24
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,453

Rep: Reputation: 2052Reputation: 2052Reputation: 2052Reputation: 2052Reputation: 2052Reputation: 2052Reputation: 2052Reputation: 2052Reputation: 2052Reputation: 2052Reputation: 2052
Since the only thing you want to fix is permissions, I would just LOOK at the backup, and change the permissions on the necessary directories to match. If you copy the backup and replace the current files, anything your users have written, modified, etc. in the last couple of weeks will be gone.
 
2 members found this post helpful.
Old 02-20-2015, 10:45 AM   #25
abudy8
LQ Newbie
 
Registered: Feb 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Just to make sure I will not make something wrong again:

I will perform the following:
1) ls -id foldername "to check permission"
Result should be something like "drwx------+ 3 Al staff 102 May 29 2014 movies"
2) chmod foldername 700 "700 is equal to rwx------ this will include subfolders"
3) Repeat the process to all folders

Please confirm or correct me if anything is wrong?
 
Old 02-20-2015, 12:01 PM   #26
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,184

Rep: Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673Reputation: 2673
I would say untar the backup into a new directory (refdir) and try something like this:
Code:
cd <userhome>
find . | xargs chmod '{}' --reference=<refdir>/'{}'
(not tested, need to be very careful about that, but it may restore all the permissions based on that backup)
 
  


Reply


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
Reversing rm /usr/lib command Trad Linux - General 8 09-11-2014 08:31 AM
Reversing Multilib mlangdn Slackware 3 02-05-2010 12:00 PM
reversing program greenthing Programming 3 02-27-2005 08:08 PM
reversing a number narendra_i Linux - Software 1 11-15-2003 09:25 AM
reversing videocard lackluster Linux - Hardware 1 11-16-2002 02:58 PM


All times are GMT -5. The time now is 07:47 AM.

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