Im trying to sort my usrers and usser permission in terminal to install Ruby gems and other libraries, but getting nowhere because of the permissions denied errors. Steps I tried:
Had a call with apple to sort out my user permissions, executed this command
diskutil resetUserPermissions / id -u
NOTE: id -u was in `` (code editing strips it out here). It did not work. still getting permission errors.
Tried to run Postgres (installed from GUI), getting
FATAL FATAL: role "Berzins" does not exist); (FATAL: data directory "/Users/Linards/Library/Application Support/Postgres/var-9.6" has group or world access DETAIL: Permissions should be u=rwx (0700)
In terminal I am:
Linards:~ Berzins$ whoami
Berzins
Linards:~ Berzins$
- Ran the follwing in terminal:
Linards:~ Berzins$ dscl . -read /Groups/admin /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist:
No such file or directory
AppleMetaNodeLocation: /Local/Default
GeneratedUID: ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000050
GroupMembers: FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000000 6F8DC3A8-D4B6-4175-B24A-1A99756706FA
GroupMembership: root Linards Berzins Linards Linards Berzins
Password: *
PrimaryGroupID: 80
RealName: Administrators
RecordName: admin BUILTIN\Administrators
RecordType: dsRecTypeStandard:Groups
SMBSID: S-1-5-32-544
Linards:~ Berzins$ dscl . -read /Groups/staff
/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist: No such file or directory
AppleMetaNodeLocation: /Local/Default
GeneratedUID: ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000014
GroupMembers: FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000000 6F8DC3A8-D4B6-4175-B24A-1A99756706FA FFFFEEEE-DDDD-CCCC-BBBB-AAAA000000ED FFFFEEEE-DDDD-CCCC-BBBB-AAAA000000EE
GroupMembership: root Berzins _xcsbuildagent _xcscredserver
Password: *
PrimaryGroupID: 20
RealName: Staff
RecordName: staff BUILTIN\Users
RecordType: dsRecTypeStandard:Groups
SMBSID: S-1-5-32-545
Linards:~ Berzins$
AND this:
Linards:~ Berzins$ id
uid=501(Berzins) gid=20(staff)
groups=20(staff),701(com.apple.sharepoint.group.1),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh)
Linards:~ Berzins$
- Then ran the following:
Linards:~ Berzins$ dscl . append /Groups/admin GroupMembership Linards
/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist: No such file or directory
<main> attribute status: eDSPermissionError
<dscl_cmd> DS Error: -14120 (eDSPermissionError)
Linards:~ Berzins$ dscl . append /Groups/admin GroupMembership Berzins
/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist: No such file or directory
<main> attribute status: eDSPermissionError
<dscl_cmd> DS Error: -14120 (eDSPermissionError)
Linards:~ Berzins$
Now Im massively stuck.
Any help appreciated.