How can I share cache files between users in a sandboxed Mac app?

Our app downloads media files and stores them for use later. The size can be up to a few GB so it's considerable. Because this can be so large I want the cache to be shared across different users. My understanding of sandboxing is that you cannot write outside of the ~/Library/Containers/<your app id>... directory, thus there will be one copy per user.
I get an access denied error when trying these folders (not surprising but I tried it anyway):
/Users/Shared/...
/Library/Application Support/...
Does anybody know of a way I can have a sandboxed application with some kind of user agnostic cache storage?

It's not worth the trouble. There are very few multi-user Macs out there. The only way to accomplish this in the sandbox would be a shared cache location that a sure would setup in preferences and store with a security-scoped bookmark. Each user would have to set the same option to use the shared cache location.

Similar Messages

  • How can i share documents with different users on the same mac?

    How can i share documents with different users on the same mac?

    Shared how? The other users can read the documents or you all can read and write the documents?
    The first is easy just place the documents in /Users/Shared anyone can access the files there and the other users will be able to read them.
    The second is a bit trickier.

  • How can I share iPhoto library between users on same mac. External hard drive has not worked.

    I need to share and edit photos between users on one mac. I have tried sharing the file on an external drive but this has caused all sorts of problems with photos disappearing and/or not being able to be edited. I was hoping iCloud sharing or family would work but being on the same machine I need the main iCloud account active at all times. This is a workplace so the second user has minimal access permissions.

    okay I'm not sure if I'm missing something, but i just imitated the same scenario on my mac and it seems to work fine. I made sure to change permissions of the shared folder AND the the actual photo library. I gave everyone access to everything (as far as the folder & library was concerned). I uploaded & viewed from both accounts. You might want to view permissions of your entire disk in disk utility to make sure there isn't an error.. Make a backup first though.
    The permissions will not stick. Earlier iPhoto versions did allow this, because iPhoto did not write to an iPhoto Library if you only wanted to browse it, but with iPhoto '11 the behaviour changed. Opening an iPhoto Library from a different account will write files with changed ownership right into the library, and that will cause problems if you edit or tag photos from a second account. The document I linked to in my earlier post is Apple Support's answer to these permission problems, when using a shared folder:     iPhoto: Sharing libraries among multiple users

  • I have one imac. my wife and i each have our own user accounts and itunes library.  How do we share selected music between user accounts?

    i have one imac. my wife and i each have our own user accounts and itunes library.  How do we share selected music between user accounts?

    To give other users read-only access to your library, use the Sharing features of iTunes. Sharing works over the local network as well as on the same computer. See the built-in help for details.
    If you want to give full read/write access to more than one user, see the support article linked below.
    iTunes: How to share music between different accounts on a single computer

  • I created new users on my mac and my music, photos, etc. is still on the administrators account. How can I share them with all users?

    I created new users on my mac and my music, photos, etc. are all still on the administrators account. I tried making the other 2 new accounts administrators but that didn't work. How can I share them with all users?

    Read "iTunes: Setting up Home Sharing on your computer."

  • How can i edit psd files in PS touch or which software/app i need for androiud tablet (newest tablet)

    how can i edit psd files in PS touch or which software/app i need for androiud tablet (newest tablet) @samsung

    You can import PSD files into Photoshop Touch but the PSD file will be flattened. (The original, of course, will remain untouched; PS Touch just copies it upon import.) I imagine this was done as a failsafe measure since PS Touch has no support for masks or adjustment layers (not to mention that PS Touch only has support for about 12 layers).

  • How can we share e-books between 2 accounts?

    My husband and I both have Kobo accounts, Adobe DE accounts and 2 separate e-book readers (both Aluretek Libre's).
    How can we share books?
    cm

    One of you will have to buy the book first (and put on reader, I assume).  According to what Kobo Customer Care told me, with Adobe Digital Editions open that person then goes on the site the book was bought from, signs in, goes on purchase history and clicks on the book.  Hit Download epub or pdf, choose Open for Windows or Save for Mac, Adobe will show the book.  make sure you are in library view, plug the reader in and authorize the device.  Drag and drop the book into the reader icon that shows up under the Bookshelf items.  It should copy the file.  When done, eject using the safely remove mass storage device option.  After unplugging, it will process the new content.  I haven't done it yet, I just received the instructions.

  • How can I share Pin variable between two packages?

    Hi every one,
    Is there any one who knows how can I share Pin variable that it is defined with OwnerPin between two packages in java card( with eclipse 3.1),I studied Sharing Interface subject and I knows it teorical but I can not do it practical .
    I can share primitive data type but I can not share Ownerpin.
    If anybody has some sample codes or knows any link ,please inform me.
    My code is same as below:
    //In Server Side
    package ginaPack;
    import javacard.framework.*;
    public class GinaApplet extends Applet implements GinaInterface{
    OwnerPIN pin;
    private GinaApplet (byte[] bArray,short bOffset,byte bLength) {
        pin =new OwnerPIN(PIN_TRY_LIMIT,MAX_PIN_SIZE);
              byte PinTemp[] = new byte[4];
              PinTemp[0] = (byte) 0x31;
              PinTemp[1] = (byte) 0x31;
              PinTemp[2] = (byte) 0x31;
              PinTemp[3] = (byte) 0x31;
              pin.update(PinTemp, (short) (0), (byte) PinTemp.length);       
        public Shareable getShareableInterfaceObject(AID clientAID,byte parameter)
              return  this;
        public OwnerPIN getPinShareable()
             return pin;         
         public void process(APDU apdu)
                      //there are some codes in this here
    }//Interface in Server side
    public interface GinaInterface extends Shareable
          public OwnerPIN getPinShareable();
    }//In Client side
    import ginaPack.*;
    public class UserCardApplet extends Applet {
    private UserCardApplet(byte[] bArray, short bOffset, byte bLength) {
         //there are some codes in this here
    public boolean select() {
              final byte[] Gina_AID={(byte)0x47,(byte)0x69,(byte)0x6e,(byte)0x61,(byte)0x41,(byte)0x70,(byte)0x70,(byte)0x6c,(byte)0x65,(byte)0x74};
              AID GinaAID = JCSystem.lookupAID( Gina_AID, ( short )0,( byte )Gina_AID.length );
              if ( GinaAID == null ) // probably not loaded on card
                        ISOException.throwIt( ISO7816.SW_FUNC_NOT_SUPPORTED );//6a 80
              GinaInterface ff = (GinaInterface) JCSystem.getAppletShareableInterfaceObject(GinaAID,(byte)0);
              if( ff == null )
                   ISOException.throwIt((short)0x0903);
    if ( ff.getPinShareable().getTriesRemaining()== 0 ) return false;
    }My problem is in this line :
    "if ( ff.getPinShareable().getTriesRemaining()== 0 ) return false; "when I select my applet this line throw an exception, ff.getPinshareable includes all of OwnerPin methods(such as getTriesRemaining ,check ,reset, update ,...)but all of them throw exception .
    I think firewal does not allow other packages uses this methods .If my guess is right then what should I do for sharing the variables that they are defined with non primitive data type such as (OwnerPin,Signature,...)
    I'd appriciated for any help.
    yours sincerely,
    Orchid.
    Message was edited by:
    NewOrchid

    Applet 1:
    package com.package1;
    import javacard.framework.*;
    public class Applet1 extends Applet {
        private static final byte tryLimit  = (byte)3;
        private static byte[] pinBytes = {(byte)1, (byte)7, (byte)4, (byte)5, (byte)2};
        private Library1 lib;
        protected Applet1(byte bArray[], short bOffset, byte bLength) throws PINException {
            lib= new Library1(tryLimit, (byte)pinBytes.length);
            lib.update(pinBytes, (short)0, (byte)pinBytes.length);
            register();
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new Applet1(bArray, bOffset, bLength);
        public void process(APDU apdu) {
            byte status=(byte)0;
            lib.resetAndUnblock();
            if (!(lib instanceof Shareable)) status += (byte)2;
            if (!(lib instanceof MyPIN)) status += (byte)4;
            ISOException.throwIt(Util.makeShort((byte)0x90, status)); // sw indicates tries remaining
        public Shareable getShareableInterfaceObject(AID cltAID, byte parm) {
            return lib;
    }Library1:
    package com.package1;
    import javacard.framework.OwnerPIN;
    import javacard.framework.PINException;
    public class Library1 extends OwnerPIN implements Interface1{
        public Library1(byte tryLimit, byte maxPINSize) throws PINException {
            super(tryLimit, maxPINSize);
    }Interface1:
    package com.package1;
    import javacard.framework.PIN;
    import javacard.framework.Shareable;
    public interface Interface1 extends Shareable {
        boolean check(byte[] pin, short offset, byte length);
        byte getTriesRemaining();
        boolean isValidated();
        void reset();
    }Applet2:
    package com.package2;
    import javacard.framework.*;
    import com.package1;
    public class Applet2 extends Applet {
        private final static byte CLA_TEST = (byte)0x80;  
        private final static byte INS_TEST = (byte)0x20;
        private final static byte P1_AUTHORIZE = (byte)0x00;
        private final static byte P1_DOIT = (byte)0x01;
        private final static byte P1_CHECK_SIO = (byte)0x0a;
        private Interface1 sio;
        protected Applet2(byte bArray[], short bOffset, byte bLength) {
            register();
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new Applet2(bArray, bOffset, bLength);
        public void process(APDU apdu) {
         byte[] buffer = apdu.getBuffer();
            if ((buffer[ISO7816.OFFSET_CLA] == CLA_TEST) ||
                (buffer[ISO7816.OFFSET_CLA] == ISO7816.CLA_ISO7816)) {
                short bytesReceived = apdu.setIncomingAndReceive();
                switch (buffer[ISO7816.OFFSET_INS]) {
                case ISO7816.INS_SELECT:
                    if (!JCSystem.getAID().equals(buffer, ISO7816.OFFSET_CDATA, buffer[ISO7816.OFFSET_LC]))
                        ISOException.throwIt(ISO7816.SW_APPLET_SELECT_FAILED);
                    sio = (Library1)JCSystem.getAppletShareableInterfaceObject(JCSystem.lookupAID(<fill in parameters>);
                    if (sio == null)
                        ISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);            
                    break;
                case INS_TEST:
                    switch (buffer[ISO7816.OFFSET_P1]) {
                    case P1_AUTHORIZE:
                        if (!sio.isValidated()) {
                            if(!sio.check(buffer, ISO7816.OFFSET_CDATA, buffer[ISO7816.OFFSET_LC]))
                                ISOException.throwIt(Util.makeShort((byte)0x9A, sio.getTriesRemaining()));
                        break;
                    case P1_DOIT:
                        if (!sio.isValidated())
                            ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                        sio.reset();
                        ISOException.throwIt(Util.makeShort((byte)0x9A, sio.getTriesRemaining()));                
                        break;
                    default:
                        ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);                   
                    break;
                default:
                    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
            else {
                ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    }1. Upload package1
    2. Install Applet1
    3. Select Applet1
    4. Upload package2
    5. Install Applet2
    6. Select Applet2

  • How can I share documents with other users from iWork?

    With iWork.com no longer in existence, how can I share large documents with other users? 

    Dropbox works pretty well for sharing.
    Jerry

  • HT4539 How can I share my downloads between my two computers

    How can I share my I tune down loads between my two I pads?

    iTunes content can only be shared to an iPad or iPhone. (iOS based devices only).

  • How can I transfer "Pages" files  from my IPad to my Mac?

    How can I transfer "Pages " files from my IPad to my IMac, I cannot use ICloud because I have Mountain Lion installed on the IMac?

    Actually, you can use iCloud and the way that you so it is to log into iCloud.com on the Mac (use Safari for best results) click on the Pages icon and then drag the Pages files into the browser window. It works the other way around as well. Log into iCloud.com on the Mac and download the files from Pages (that you created on the iPad) in iCloud onto your Mac. You can click on the file in the documents window and select it to Download by clicking on the Gear icon or right click upon the file and select download.
    The files will then sync to the Pages app on the iPad - assuming hat you have use iCloud tuned on in Settings>Pages>Use iCloud>On. I have an iMac running Tiger 10.4.11 that I can still move Pages/Word files back and forth Iike this.
    Also, File Sharing with iTunes is a great way to move the files back and forth.
    iOS: About File Sharing - Support - Apple
    Message was edited by: Demo

  • How can I share my iPhone's wireless connection with my Mac?

    My iPhone is the only device I have that connects to the internet. I cannot use the personal hotspot option because I don't have the necessary plan, nor will I be getting it since it is extremely expensive. How can I share my iPhone's connection?

    Mac_Journal wrote:
    A different question then: Can I create a functioning wifi network from my Mac?
    Yes.
    -> OS X Mountain Lion: Create a computer-to-computer network
    Note: This will not allow you to connect your Mac to the internet via your iPhone (since you need a personal hotpost to share the internet with yrou Mac).

  • How can I share a folder between two users on the same iMac?

    I have an iMac with 2 user accounts and I want to share a folder between them. I have gone on to system preferences>sharing and turned on file sharing. I have also got the 'Get Info' thing up, selected 'Shared Folder' and added the other user to the read and write permissions...it just doesn't show up on the other desktop (the folder is on my desktop, I would have expected to see it on the other desktop...?)
    Any ideas?

    jrwood116 wrote:
    Thanks, but do you have to do that every time you share a folder?
    No, you just need to do it once and that's it. Anything that is in the Shared folder is accessible by all user accounts within the same Mac.
    jrwood116 wrote:
    I've read numerous 'how to share a folder' blogs and they just say it's as simple as clicking 'share' and allowing specific users to access it...none have mentioned this (not saying your advice is wrong at all, just don't get why no-one else has mentioned what appears to be a key step!)
    Can you give me an example of such a blog. I suspect you may have mis-understood what they were saying but if you can provide a link, I'll look at it.

  • How can I share a folder between two users on the same mac?

    Hi all,
    I would like to share a folder between multiple users on the same macbook without having to transfer the folder to the Public/Shared folder.
    Is there not a way, using the the folders shared permissions, to allow shared folders from one user to be visible and usable by another user on the same mac without having to move the folder to a designated shared location?
    Regards,
    Caleb

    jrwood116 wrote:
    Thanks, but do you have to do that every time you share a folder?
    No, you just need to do it once and that's it. Anything that is in the Shared folder is accessible by all user accounts within the same Mac.
    jrwood116 wrote:
    I've read numerous 'how to share a folder' blogs and they just say it's as simple as clicking 'share' and allowing specific users to access it...none have mentioned this (not saying your advice is wrong at all, just don't get why no-one else has mentioned what appears to be a key step!)
    Can you give me an example of such a blog. I suspect you may have mis-understood what they were saying but if you can provide a link, I'll look at it.

  • Can I share ONLY music between users on iTunes

    Hi, i'm creating an account on my Mac for my niece who has just got her own iPhone.
    It will be registered to her iCloud account with her own photos, Mail, Mac & iOS apps, files, etc. But I have a large music library that I want to share with her.
    Now I want to keep everything else separate e.g. Books, apps, Audiobooks, etc. Is this possible? And if so, how??
    Thanks!
    P.S. I'm running OSX Mavericks but will soon be updating to Yosemite once available.

    Yosemite may have new sharing features about which I do not know.  iOS8 preview has a lot of new sharing things.
    Not sure what exactly is possible with Home Sharing.
    iTunes: How to share music and video - http://support.apple.com/kb/HT2688 - about Music Sharing and Home Sharing
    Home Sharing Support page - http://www.apple.com/support/homesharing/
    iTunes: Setting up Home Sharing on your computer - http://support.apple.com/kb/HT4620
    Understanding Home Sharing - http://support.apple.com/kb/HT3819
    iOS8 preview - http://www.apple.com/ios/ios8/family-sharing/ -family sharing
    iTunes Home Sharing now works between users on same computer - https://discussions.apple.com/thread/3865597
    If none of the above work you can set it up so only music is in a shared folder and the rest is in your specific user account.  That will be somewhat involved so it is better if one of the above methods works.

Maybe you are looking for

  • Trouble in OS9 w/HP 5100 Laserjet via USB Jetdirect card

    Hello, I'm stumped with this one. I was doing some upgrading for a client this past week. His machine is a 400 MHz G4 tower, it was running 9.0.4 and he wanted to upgrade to 9.2.2. Everything went fine with the upgrade but now the HP 5100 isn't behav

  • Another website glitch resulting in gift card charge without purchase being completed

    I have read similar complaints on this forum, but it appears Best Buy has an IT problem with their website. Last night I ordered 2 video games through their website, applied a gift card, and when I hit the final button to Place My Order was greeted w

  • COPA Report Data Inconsistency

    We have our QA box refreshed with PRD Box. So the data in the two systems is same. I have created summarization level for COPA report Ke30 because report is taking too long in PRD as data comes directly from segment levels. The numbers for the basic

  • Which update do i install?

    It appears I'm unable to edit the text in an illustrator file that was sent to me.  I can still delete individual letters, but cannot select blocks of text. Perhaps the client has prevented certain editing capabilities?  Is that possible?  I need to

  • My skype contacts is all gone!

    Yesterday I went on my skype to see that my contacts vanished! I'm still have them and they're as conacts on my recents. Is this a glich that can't be fixed?