Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Lankyman

macrumors 68020
Original poster
May 14, 2011
2,083
832
U.K.
I have a mid-2011 21.5 inch iMac into which I had fitted an SSD whilst keeping the original HDD in situ. That was 3 years ago. Fast forward to now and the HDD was showing signs of possible failure.

I decided to remove both the HDD and the SSD and fit a new larger capacity SSD (Intel 545s series) in the bay where the original HDD sat. I already had an unused OWC HDD thermal sensor so this further surgery was a pretty straightforward job. I did a clean install of High Sierra using the new APFS format.

The only fly in the ointment was enabling TRIM. Each time I entered the sudo trimforce enable command when I clicked the final Y to reboot I would get a message along the lines of 'I did not have permission to carry out this function' along with 01 error code.

What I have ended up having to do is go into recovery mode, open terminal and use the command 'csrutil disable' then reboot. Once I had done this the sudo Trimforce command worked and Trim is now enabled. I then had to go back into recovery mode, open terminal and use the command 'csrutil enable'.

I never had to do this with older versions of OS X. Is there a valid reason for having to jump through hoops or is it simply Apple trying to make things difficult for it's customers?
 
The "Trimforce" command does not normally require disabling SIP with the "csrutil disable" command. It sounds like something isn't quite right with your installation.
 
The "Trimforce" command does not normally require disabling SIP with the "csrutil disable" command. It sounds like something isn't quite right with your installation.
Doing an online search I noticed other users have experienced the same issue. The full message was as follows -
Are you sure you wish to proceed (y/N)? y

Your system will immediately reboot when this is complete.

Is this OK (y/N)? y

Enabling TRIM...

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/_CodeSignature/ CodeDirectory: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/_CodeSignature/ CodeRequirements: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/_CodeSignature/ CodeResources: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/_CodeSignature/ CodeSignature: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/Info.plist: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/version.plist: Operation not permitted

Operation failed (error 1).

Whatever this message means I have got around it by temporarily disabling SIP. I have run EtreCheck plus other diagnostics and no issues have been found at all. It is a puzzle.
 
Last edited:
From the messages above, it shows the config process tried to copy (and maybe overwrite) system files. Therefore you need to disable SIP first to allow that process.

I haven't tried enabling TRIM, but that was happened on your case.

Hope this help.

Doing an online search I noticed other users have experienced the same issue. The full message was as follows -
Are you sure you wish to proceed (y/N)? y

Your system will immediately reboot when this is complete.

Is this OK (y/N)? y

Enabling TRIM...

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/_CodeSignature/ CodeDirectory: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/_CodeSignature/ CodeRequirements: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/_CodeSignature/ CodeResources: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/_CodeSignature/ CodeSignature: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/Info.plist: Operation not permitted

cp: /System/Library/Extensions/AppleDataSetManagement.kext/Contents/version.plist: Operation not permitted

Operation failed (error 1).

Whatever this message means I have got around it by temporarily disabling SIP. I have run EtreCheck plus other diagnostics and no issues have been found at all. It is a puzzle.
 
From the messages above, it shows the config process tried to copy (and maybe overwrite) system files. Therefore you need to disable SIP first to allow that process.

I haven't tried enabling TRIM, but that was happened on your case.

Hope this help.
The problem is that it's not normal to need to disable SIP to use the "Trimforce" command.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.