How can I change the Messages notification sound I'm trying to change notification sounds for apps like messages. I've tried to copy the .caf files using terminal, but it gives me "Operation not permitted"


Does anyone know a way around this? I'm running macOS Sierra



Update: I have successfully moved BoxeeBox.caf to /System/Library/PrivateFrameworks/ToneLibrary.framework/Versions/A/Resources/AlertTones/New, and it shows up in that folder


It is not one of the options that messages gives me now though



Do I have to change the name of BoxeeBox.caf to one of the other files in AlertTones/New's names? Or is there an apple script file that I need to add BoxeeBox.caf into?



Update: it works, I needed to put BoxeeBox.caf into AlertTones/New and replaced Bloom.caf with it, but now I'm trying to change the sound that it makes when you receive a message when that chat is open. I have already replaced ReceivedMessage.caf (as seen in the first screenshot), Default.aiff, and Recieved Message(in Applications/Messages/Contents/Resources), but it is still making the origional sound. Is there a different file that I have to replace?
A feature called System Integrity Protection, which Apple introduced in El Capitan, prevents you from modifying most system files on your Mac. You can still make changes, but you need to disable System Integrity Protection first. For security reasons, this can only be done from recovery mode.


  
  Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
  Click Utilities → Terminal.
  In the Terminal window, type in csrutil disable and press Enter.
  Restart your Mac.
  


You will now be able to edit any files you wish! (Just remember, with great power comes great responsibility, or something like that.)

After you've finished making changes, you can turn System Integrity Protection back on, if you want. Just repeat the above steps, except enter csrutil enable (instead of disable) in step 3.