Search Unity

Write to a shared directory between users

Discussion in 'Linux' started by mxmlb_joc, Jul 19, 2017.

  1. mxmlb_joc

    mxmlb_joc

    Joined:
    Jan 9, 2017
    Posts:
    2
    Hi there !

    We're making an application for schools where they can download some assets that will be loaded dynamically later.

    The user have 3 choices :
    - 1) download for self (it is saved in persistentDataPath)
    - 2) download for the different users on the device (saved in ????)
    - 3) download on any other directory, the user opens a custom file browser to select it.

    So my question is about the second point, I don't know where to save it without getting a "permission denied" error.
    On Windows, we write into a subdir of System.Environment.SpecialFolder.CommonApplicationData, and on OSX into a subdir of /usr/local.

    Does anyone have an idea about possible the location on Linux ?
     
  2. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    There aren't many locations on linux that are world-writable by default.
    If you have control over how the client machines will be configured, you could create a world-writable directory in e.g. /usr/local. If you don't, /tmp might be your only option (and /tmp is often cleared on reboot).