1

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 ?

8
  • 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
    Commented Nov 15, 2018 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
    Commented Nov 15, 2018 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
    Commented Nov 15, 2018 at 10:20
  • @Tetsujin we are also making symlinks, Pictures won't just disappear.
    – Liviu
    Commented Nov 15, 2018 at 10:38
  • 1
    Won’t renaming these directories break iCloud drive? Even making them links will do so
    – mmmmmm
    Commented Nov 17, 2018 at 9:15

1 Answer 1

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.

3
  • 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
    Commented Nov 15, 2018 at 9:24
  • Yes, same procedure.
    – jksoegaard
    Commented Nov 15, 2018 at 9:38
  • Thank you, I was hoping there is a more restrained right.
    – Liviu
    Commented Nov 15, 2018 at 13:39

You must log in to answer this question.

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