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.
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
/private/tmp I kept getting operation not permitted.
sudo chmod 1777 also failed in the same way on both
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?
csrutil disable. After that, I was able to execute
repair_packageswith success and was able to access /tmp as usual. However, after going back to recovery mode and executing
csrutil 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.
csrutil disable. After a restart, I removed tmp folder:
sudo rm /tmp; sudo rm /private/tmp, created tmp folder
sudo mkdir /private/tmp; sudo chown root:wheel /private/tmp; sudo chmod 1777 /private/tmp, created the symlink:
sudo ln -s /private/tmp /tmp, and ran
repair_pacakgesagain. After going back to recovery mode and running
csrutil enable, all is working again! However, the permissions of /private/tmp used to be
drwxrwxrwt@and now they are
drwxrwxrwt. I'm unsure what the
@is and if this will cause me problems.
@extended permissions marker
sudo mkdir /private/tmpfollowed by
sudo chmod +t /private/tmpis enough.