10

I'm trying to achieve this: Make my password protected SSH key expire or timeout after a while

In Yosemite, this worked fantastic, in El Capitan, using sudo, the files in /System/Libary/LaunchAgents is completely locked :( I cannot chmod, write, or chown the files.

Using Finder -> Get info, the locked checkbox is disabled for the folder and the files in it (changing owner using finder doesn't work too).

2
  • have you tried to modify the files in single user mode ?
    – enzo
    Commented Oct 6, 2015 at 13:48
  • @maetsoh Why single user mode? I would just try logging in as root.
    – voices
    Commented Oct 6, 2015 at 15:31

2 Answers 2

15

El Capitan adds a new security feature named System Integrity Protection (SIP). Among other things, SIP prevents parties other than Apple from adding, deleting or modifying directories and files stored in certain directories:

/bin
/sbin
/usr
/System

Apple has indicated that the following directories are available for developers to access:

/usr/local
/Applications
/Library
~/Library

All directories in /usr except for /usr/local are protected by SIP.

3
  • 2
    Ugh. How annoying. Apples penchant for locking everything down is really starting to get old.
    – voices
    Commented Oct 6, 2015 at 15:33
  • 2
    @tjt263 It's intended to save normal users from themselves. SIP can be turned off if you're willing to accept the lowered security.
    – ceejayoz
    Commented Oct 6, 2015 at 20:15
  • 1
    If you're just making a quick fix like this, all you need is to either boot another OS that doesn't use SIP (ie Yosemite or any non Apple OS), or disable in recovery, do your thing, then enable again. Edits do persist even when turned back on.
    – kirb
    Commented Oct 7, 2015 at 9:45
2

In my case, it was the new System Integrity Protection feature in El Capitan. I disabled that in recovery mode using this link :

  1. Boot into recovery mode
  2. Click Utilities at the top, and then Terminal
  3. Type in csrutil disable

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .