13
5
macOS El Capitan (10.11) is unable to install any software updates or install any software because the /tmp
and the /private/tmp
folders don't seem to be writeable.
Running this:
sudo /usr/libexec/repair_packages --repair --standard-pkgs --volume /
Gives me this error:
unable to set owner and group on "tmp" Error 1 Operation not permitted
unable to set permissions on "tmp" Error 1 Operation not permitted
Is there a way to manually delete the tmp folders and recreate them?
When I tried renaming or deleting /tmp
or /private/tmp
I kept getting operation not permitted. sudo chmod 1777
also failed in the same way on both /tmp
and /private/tmp
folders
Disk Utility says the disk is healthy with no issues detected when running first aid.
Is there any way to redirect the tmp
location to another writeable folder?
1Did you disable SIP first? From Recovery; Terminal
csrutil disable
– Tetsujin – 2016-10-10T04:50:12.9302I have the same problem. Followed Tetsujin's advice, restarted in recovery mode, and ran
csrutil disable
. After that, I was able to executerepair_packages
with success and was able to access /tmp as usual. However, after going back to recovery mode and executingcsrutil enable
, my system is having the same problem. It seems the only way I can gain access to /tmp is by disabling System Integrity Protection. – Andrew Ferk – 2016-10-17T21:15:42.6734I ended up going back to recovery mode and executing
csrutil disable
. After a restart, I removed tmp folder:sudo rm /tmp; sudo rm /private/tmp
, created tmp foldersudo mkdir /private/tmp; sudo chown root:wheel /private/tmp; sudo chmod 1777 /private/tmp
, created the symlink:sudo ln -s /private/tmp /tmp
, and ranrepair_pacakges
again. After going back to recovery mode and runningcsrutil enable
, all is working again! However, the permissions of /private/tmp used to bedrwxrwxrwt@
and now they aredrwxrwxrwt
. I'm unsure what the@
is and if this will cause me problems. – Andrew Ferk – 2016-10-17T21:34:43.9731
@AndrewFerk: see these posts http://apple.stackexchange.com/questions/42177/what-does-signify-in-unix-file-permissions http://unix.stackexchange.com/questions/10/what-does-the-mean-in-ls-l for explanation of the
– Adam Michalik – 2016-10-18T07:25:16.410@
extended permissions marker