macOS Sierra: papers protected?

Since upgrading to macOS Sierra public beta, every time I open a paper from my Zotero library in Preview and try to edit it (e.g. Highlight some text) I get a message (from Preview) that “The original document can’t be changed, so a duplicate with your changes has been created.”. I have also reported this to Apple since it is probably due to a change in the OS?
  • I don't know anything about the mac OS update specifically, but judging by the error message, check file permissions in your Zotero data directory.
    https://www.zotero.org/support/zotero_data
  • the PDF file itself is
    -rw-r--r--@ 1 christian staff ...
    which is the same as other PDFs that I can edit. It's located at
    ~/Library/Application Support/Zotero/Profiles/p4w1twjt.default/zotero/storage/C2ZFSRTT
    The enclosing folders up to `p4w1twjt.default` are drwx------ <n> christian staffthen drwxr-xr-x <n> christian staff

    From what I know this should be ok, but I am not familiar enough to tell for sure?
  • What's the result for 'xattr -l' on the PDF? Do files you can edit have the '@' as well?
  • xattr shows this:
    $ xattr -l O\'Brien....pdf
    com.apple.quarantine: 0082;57904424;Preview;

    And yes editable files also have the '@'.
  • edited July 23, 2016
    The issue seems to be fixed by moving the Zotero data directory out of `~/Library`. All I did was change the Data directory to `~/Zotero Library` (in the standalone preferences dialog), and then dragging the files to the new location in Finder.
  • I am also having this problem since upgrading to both Sierra and the latest Zotero. Anyone else?
  • Yes, it looks like Apple changed Preview in Sierra to prevent editing of files within ~/Library/Application Support (though I can't actually find any documentation of this). I suspect another PDF program (e.g., Acrobat Reader) would work — even TextEdit doesn't do this — but the easiest option is probably just to move your Zotero data directory out of ~/Library and into ~/Zotero or similar.

    We're going to have Zotero 5.0 use ~/Zotero by default for new installations, and we'll also have it migrate existing data directories out of ~/Library/Application Support to address this (though I'm not sure if that part will happen for 5.0 Final).
  • edited 22 days ago
    it looks like Apple changed Preview in Sierra to prevent editing of files within ~/Library/Application Support (though I can't actually find any documentation of this).
    It looks like this might be a change in response to a Dropbox hack:

    http://daringfireball.net/linked/2016/09/20/dropbox-macos-security
    http://applehelpwriter.com/2016/09/20/dropbox-hack-blocked-by-apple-in-sierra/
    and
    https://forums.developer.apple.com/thread/62838

    Apple's documentation on this hasn't been updated since Sierra's release:

    https://support.apple.com/en-us/HT204899
    https://developer.apple.com/library/content/documentation/Security/Conceptual/System_Integrity_Protection_Guide/FileSystemProtections/FileSystemProtections.html
  • No, that's /Library/Application Support, not ~/Library/Application Support, that's an extended attribute on a specific file, and this isn't enforced at the system level anyway. It's only Preview (that I've found) that's doing this.
  • Okay, I clearly don't know what I'm talking about then. Sorry for the noise. I plead the fifth from here on out!
  • Same problem with MacOS Sierra and Preview saving edited pdf files as copies. Moving the library to ~/Zotero as suggested worked. Thanks!
  • I am having the same problem.

    If I am reading correctly, the following provides a fix until Zotero 5.0: (quoting from Dan above)

    "the easiest option is probably just to move your Zotero data directory out of ~/Library and into ~/Zotero or similar."

    Please confirm this is all I need to do and if so, kindly give me a little more step by step....having trouble understanding exactly what to do.
  • edited 4 days ago
    I can confirm this fixes the problem. I had the same issues after upgrading to Sierra.

    Erressler

    In preferences, you can click a button to take you to your library folder, ~/zotero. Just move this out of the ~/library path. I put it elsewhere along side my /Documents and /Applications in my root user directory.
  • First, thank you!

    Second, this apparently seems simple. However, step one says go to preferences and click on the library folder. When I go to preferences under the apple icon, under Safari, and under Zotero, and I do not see a "library folder". As such, I cannot get past step one. Challenged here in Peachtree Corners.
  • No, this is the Zotero preferences in the advanced tab:
    https://www.zotero.org/support/preferences
  • OK...embarrassed but here goes: I am now in the Files and Folders, under Advanced, under preferences, in Zotero. How exactly do I "Just move this [~/zotero] out of the ~library path...[and] put it elsewhere...."
  • There's two things you need to do:
    1. (Disable automatic sync in the sync tab of the preferences then...) Go to show folder, which opens the data directory in Finder. Then close Zotero and move the entire "zotero" folder (in Finder) to the new location.
    2. Restart Zotero. You'll see an empty library. Now again under files and folders, use the custom location button and browse to the new location of the zotero folder. (You'll need to again restart Zotero and you should re-enable auto-sync)
  • edited 1 day ago
    OK...disabled sync, then moved entire Zotero folder to Applications (on iMac). When I tried to open Zotero again, I received this error msg: "The Zotero data directory could not be found." When I tried to open files and folders, nothing was responsive.

    Update: Had to relocate and then restart...everything OK now! Thank you.
Sign In or Register to comment.