0

Our application needs write access to the user's Home directory, specifically to Pictures, Movies, Music, etc., so it can redirect them to our cloud support. But, on Mojave, renaming Pictures (to some back-up folder) fails with EPERM without the Full Disk Access right, which seems too much and too hard to acquire (cf "Unfortunately, Apple has intentionally designed the process of granting Full Disk Access to be difficult, so that users are discouraged from granting Full Disk Access unless absolutely necessary." seen here). Is there another way ?

  • 1
    Renaming any commonly-used standard system folder strikes me as a very poor way to handle this. What does every other app & the OS itself do when it wants the original Pictures folder? – Tetsujin Nov 15 '18 at 8:54
  • @Tetsujin that may be, but it is well enough known practice: stackoverflow.com/questions/44834712/… . In Windows, there is specific API (IKnownFolderManager). Anyway, not my question. – Liviu Nov 15 '18 at 9:01
  • 2
    That is making symlinks, completely different - your version will literally break any other app that tries to access the Pictures folder that your app has renamed. It's just a really bad idea. – Tetsujin Nov 15 '18 at 10:20
  • @Tetsujin we are also making symlinks, Pictures won't just disappear. – Liviu Nov 15 '18 at 10:38
  • 1
    Won’t renaming these directories break iCloud drive? Even making them links will do so – user151019 Nov 17 '18 at 9:15
1

If you want to do this as a regular user running in standard mode, then no - you have to ask the user to grant permission via Full Disk Access.

You can do it through other means by booting the Mac in Recovery mode for example, but I assume this is not something you want to do as part of a standard process. Granting the correct permissions is way easier.

Note that it is possible to grant the permission, make the change, and then remove the permissions again. This will help if you feel that it is too permissive to allow this software Full Disk Access forever.

  • To grant the permission, we have to direct the user towards the System Preferences / Security & Privacy / Privacy / Full Disk Access and ask him/her to do it directly. Do you suggest the same mechanism for removing this permission ? – Liviu Nov 15 '18 at 9:24
  • Yes, same procedure. – jksoegaard Nov 15 '18 at 9:38
  • Thank you, I was hoping there is a more restrained right. – Liviu Nov 15 '18 at 13:39

You must log in to answer this question.

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