/etc and /home partitions ownership changes and rollback

482 views Asked by At

Somehow some one from my team has changed our production server (RHEL 5.5) /etc and /home partitions ownership to oracle user. When i check /etc and /home with "ls -l /", it shows as follows

/etc and /home

Can i find who and when these changes are made?

Now is it possible to restore the ownership? or can i change the entire permissions to root user? Which one is possible and which one is safe.

Please help me in this issue.

1

There are 1 answers

2
Tharanga Abeyseela On

just try stat command

stat yourdirectory this will give you some details like this

stat /etc

Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2013-12-11 12:27:52.000000000 +1100
Modify: 2013-03-18 10:11:57.000000000 +1100
Change: 2013-03-18 10:11:57.000000000 +1100

you can change permissions on Linux/Unix using chown

chown root:root -R directory name (-R is to use recursive permissions , this changes will affect your whole directory structure ).

chown root:root direcotryname - will change only the directory , not sub directories.

this will change only the user and group. if you need to change the permissions you need to use chmod command. (like read,write,execute permissions)

this is a good reference about permissions on Linux

http://ubuntuforums.org/showthread.php?t=1252905

Hope this helps.

Tharanga Abeyseela