Why isn't the NSFileProtectionKey attribute disabled?

I have created an iOS test application that applies the NSFileProtectionKey attributeNSFileProtectionComplete

to the test file . I will kill the application and lock the device with a password. I then SSH into the device. In the SSH session, I can still read the test file as if it was not encrypted or some kind of security was installed.

Using FileDP over SSH in a test file, the protection level is displayed as expected, which was set to NSFileProtectionComplete

.

I tried to login both root and mobile via SSH and the results are the same. Is encryption enabled on the device if the device is locked?

Or is SSH not a reliable test if the file was protected? If not SSH, how should you check file protection?

+3


source to share


1 answer


Make sure that:

  • password lock is set in the "Settings" application,
  • the device is effectively locked with a passcode (the "Require password" option may turn off the screen, but the lock is not active).


Note that:

  • the protection is only for the contents of the file, not for its name. Thus, you can get a list of protected files even if protection is active,
  • prior to iOS 8, marking a folder as NSFileProtectionComplete does not guarantee that the files it contains are protected (you need to mark each file).
+2


source







All Articles