How to fix file permission problem Oracle Solaris

After a huge mistake if all system file owners and permission changed and you don't know which ones changed you can apply this action plan to fix this permissions problem on  Oracle  Solaris.

Oracle  Solaris  packages' database keeps  file owner and  permission. You can  get this information to run  "pkgchk" command. I add one example  for  "/usr/local/bin/expect" file.

Expected mode: 0755
Expected owner: bin
Expected group: bin

#pkgchk -lp /usr/local/bin/expect
Pathname: /usr/local/bin/expect
Type: regular file
Expected mode: 0755
Expected owner: bin
Expected group: bin
Expected file size (bytes): 33228
Expected sum(1) of contents: 20160
Expected last modification: Apr 12 10:40:45 2011
Referenced by the following packages:
SMCexpect
Current status: installed

So it'll be easy to fix this problem to apply this action plan step by step.

Step 1:Shutdown  Server and  Boot from cd-rom for shell.

#init 0
{}ok boot  cd-rom

Step 2:Mount  "/" device   under  "/a" directory.

Step 3:Run  pkgchk command

#pkgchk -R /a -f
#init 6

Another way but there are some risks that open server single-user mode and apply this command.

 #init 0
{}ok boot  -s
#pkgchk -f
#init 6

 

 

I'm a IT Infrastructure and Operations Architect with extensive experience and administration skills and works for Turk Telekom. I provide hardware and software support for the IT Infrastructure and Operations tasks.

205 Total Posts
Follow Me