With nginx and homebrew installs, you may see the following error if you have installed nginx with homebrew (or otherwise) and are seeing errors when you try an upload files using wordpress or otherwise:
nginx/client_body_temp/0000000007" failed (13: Permission denied) where the number of the temp directory may be different.
/usr/local/var/run/nginx folders may have been set with restrictive users or permissions (or depending on your setup something like
/opt/homebrew/var/run/nginx). Cd into that folder with
cd /usr/local/var/run/nginx and run
sudo chown -R <your_admin_user>:admin client_body_temp/ to allow the right processes to be able to upload the files.
I wanted to offer some more clarity on converting a hard drive to the AFPS format, for upgrading from Mojave to Catalina, or something similar. I could not upgrade without doing so. I was surprised at how technical the process was, but I think it’s manageable for most people. Though terrifying to have to adjust boot settings (back in my windows days this was a non-recoverable screwup at times). After a successful conversion to AFPS, I could not boot out of recovery mode and would get the “Running bless to place boot files failed” error.
First convert the Hard Drive
- Any backing up, I would make sure to do before converting. I put that off, and ended up being fairly nervous when my OS would no longer boot 🙂 Luckily, I ended up back with the same OS with a converted hard drive and proceeded to upgrade.
- For me, I had to boot in recovery mode to get the option I needed. Restart your Mac and hold down Cmd+R to boot into recover mode.
- Launch the Disk Utility app from the options.
- Select your hard drive and then its main volume, then unmount it (I had to do this to get the convert option to be enabled).
- Select Edit then Convert to APFS
- It should convert after about two minutes and you can reboot.
At this point, I restarted and found my Mac would always boot into recovery mode. When I selected the main hard drive and tried to restart from that, I got an error, indicating “Running bless to place boot files failed.” There were some helpful sites, but the instructions didn’t quite match up for me, and the more technical part of creating a folder with the hard drive’s unique id was not very clear. The following are the steps I took, but see: https://www.tecklyfe.com/boot-failures-after-converting-macos-ssd-to-apfs/ and https://apple.stackexchange.com/questions/308531/could-not-create-a-preboot-volume-for-apfs-install (You may be able to do this in a shorter number of steps than me)
- In recovery mode open the terminal from the menu Utilities -> Terminal.
- List the hard drive info with
diskutil apfs list
- If you’re like me you already have a preboot volume. But apparently you may need to create one with
diskutil apfs addVolume disk"Disk Number here" apfs Preboot -role B
- The steps in the articles I was seeing got less clear to me here. Props to the existing info, but I wanted to add my two cents. At this point I needed to copy existing preboot files into another preboot folder. Before I could use a copy command, I had to create a new preboot folder with the UUID of the hard drive volume disk2s1 (or whatever your main apfs partition is listed as in the
diskutil afps list command. UPDATE: The UUID to use should be the that of the primary partition (and not the pre-boot partition) – thanks to opherko. The command I needed was:
mkdir -p /Volumes/Preboot/<The UUID, a long alphanumeric id>/System/Library/CoreServices
- At that point I could do
cp -RP /Volumes/<Your hard drive name here>/System/Library/CoreServices /Volumes/Preboot/<The UUID>/System/Library/CoreServices. It would seem to me you are copying your old, functioning boot files into a new boot folder for your converted hard drive. Perhaps temporarily until another process adjusts things. Make sure, as noted above, that the UUID is the primary partition’s UUID.
- Now you can run the update commands for the preboot. Replace disk2s1 with your disk:
diskutil apfs updatepreboot disk2s1
- Run the bless utility:
bless --folder /Volumes/<Your hard drive name here>/System/Library/CoreServices --bootefi --verbose
- You may need to use the Startup program to assign the boot partition when exiting the utilities.
- At this point I was very relieved that upon trying to reboot, you should no longer get the error “Running bless to place boot files failed.” and the OS should start. For me, I was back in Mojave, with all my same files on a hard drive that was now formatted for AFPS, where I could proceed to install Catalina. Hopefully this informs a successful end result for someone else out there.