I have change permission of /var location by mistake with 777 and now my Keychain Access not working fine (i have stop chmod but some file and folder's permission are change )
folder in var location with permission
drwxr-xr-x 26 root wheel 884 Jul 8 22:02 .
drwxr-xr-x@ 6 root wheel 204 Jan 23 2015 ..
drwxrwxrwt 3 root wheel 102 Mar 24 2015 Keychains
drwxrwxrwx 2 root wheel 68 Sep 10 2014 agentx
drwxrwxrwx 8 daemon wheel 272 Jan 23 2015 at
drwxrwxrwx 101 root wheel 3434 Jul 8 20:49 audit
drwxrwxrwx 2 root wheel 68 Sep 10 2014 backups
drwx------ 72 root wheel 2448 Jul 9 09:19 db
drwxrwxrwx 3 root sys 102 Jul 9 01:57 empty
drwx------ 5 root wheel 170 Jul 2 2015 folders
drwxrwxrwx 2 _jabber _jabber 68 Sep 10 2014 jabberd
drwxrwxrwx 3 root wheel 102 Sep 10 2014 lib
drwxrwxrwx 65 root wheel 2210 Jul 9 10:46 log
drwxrwxrwx 4 root wheel 136 Dec 18 2015 logs
drwxrwxrwx 3 root mail 102 Jul 9 10:50 mail
drwxrwxrwx 3 root wheel 102 Jan 23 2015 msgs
drwxrwxrwx 2 root wheel 68 Sep 10 2014 netboot
drwxrwxrwx 2 _networkd _networkd 68 Sep 10 2014 networkd
drwxrwxrwx 14 root wheel 476 Jul 8 23:32 root
drwxrwxrwx 4 root wheel 136 Sep 10 2014 rpc
drwxrwxrwx 30 root daemon 1020 Jul 9 10:37 run
drwxrwxrwx 2 daemon wheel 68 Sep 10 2014 rwho
drwxrwxrwx 7 root wheel 238 Jan 23 2015 spool
drwxrwxrwt 31 root wheel 1054 Jul 9 10:54 tmp
drwxrwxrwx 3 root wheel 102 Jul 9 01:36 vm
drwxrwxrwx 3 root wheel 102 Sep 10 2014 yp
login and system Keychain are in read-only with not item display
when i try to first ads then
Repair started
Checking keychain configuration for patel (user ID=501)
Home directory is /Users/patel
Checked login keychain
Unable to open ~/Library/Keychains/login.keychain (-25312)
Renamed /Users/patel/Library/Keychains/login.keychain to /Users/patel/Library/Keychains/login_renamed.keychain
Repair terminated unexpectedly
when try to reset then
A Module Directory Service error has occurred.
when try to create new keychain then
An error occurred while creating a new keychain.
and some time i have got
"Unapproved Caller", "SecurityAgent may only be invoked by Apple Software".
any help to restore var folder permission