Operation not permitted error when trying to open files from a map

Having trouble installing Oxygen? Got a bug to report? Post it all here.
AnnetteSo
Posts: 16
Joined: Thu Aug 25, 2022 2:28 pm

Operation not permitted error when trying to open files from a map

Post by AnnetteSo »

Error_and_intro_poc_dita___Users_annettesohor_Documents_Dita-OT-test_poc-doc_WATSONHEALTH_CAREMANAGER_docs_intro_poc_dita__-__oXygen___XML_Author_and_Oxygen_XML_Forum_-_Post_a_new_topic.png
Error_and_intro_poc_dita___Users_annettesohor_Documents_Dita-OT-test_poc-doc_WATSONHEALTH_CAREMANAGER_docs_intro_poc_dita__-__oXygen___XML_Author_and_Oxygen_XML_Forum_-_Post_a_new_topic.png (123.28 KiB) Viewed 2332 times
Hello, I've copied one of my dita source repos to a new local folder so as to experiment with changing some dtd settings. For some reason, I cannot open topics from the parent map until after I have first opened each topic by browsing to it directly, even though the files are there in the same folder and the paths are correct in the hrefs etc. I get an 'operation not permitted' error, as shown in the screenshot. Please can you advise?
Radu
Posts: 9281
Joined: Fri Jul 09, 2004 5:18 pm

Re: Operation not permitted error when trying to open files from a map

Post by Radu »

Hi,

This kind of error looks like being given by the operating system when the Oxygen application attempts to read the file. It may be because the file is marked as read-only or because the file (or entire folder) has certain permissions set on it which disallows the Oxygen application to read content from it. But this is not something we control, maybe you can right click in the Finder such a file, "Show info" and look at its permissions, if it's marked as read-only....

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
AnnetteSo
Posts: 16
Joined: Thu Aug 25, 2022 2:28 pm

Re: Operation not permitted error when trying to open files from a map

Post by AnnetteSo »

Thank you Radu. Seems this problem had occurred for many mac users in our org. I re-installed our doc toolset that includes Oxygen and the problem is fixed.
im_rem
Posts: 24
Joined: Tue Jun 14, 2022 1:08 pm

Re: Operation not permitted error when trying to open files from a map

Post by im_rem »

Hello,
one of our projects is located in a shared folder where users from a domain have read&write permissions (like in the Windows "Public Documents" folder). Oxygen XML changes the file permissions of the XPR file when it is saved. It removes the domain user group from the permissions so that another user from the domain cannot open the file at all. Only the user who saved the file can open it. Can I somehow change this behavior? (Other files in the project do not loose their permissions when they are being saved.)
KR
adrian
Posts: 2867
Joined: Tue May 17, 2005 4:01 pm

Re: Operation not permitted error when trying to open files from a map

Post by adrian »

Hello,
Oxygen XML changes the file permissions of the XPR file when it is saved. It removes the domain user group from the permissions so that another user from the domain cannot open the file at all. Only the user who saved the file can open it. Can I somehow change this behavior? (Other files in the project do not loose their permissions when they are being saved.)
I guess it depends on how the permissions are assigned. If those permissions are assigned only to the file and not the parent folder where the file resides, then it is possible to lose the file permissions in the process. TBH I would have expected other files, not just the project file to have the same fate. Are the other files in the same folder as the xpr file, or nested in subfolders?

What Oxygen does by default when a file is saved is that it creates a temporary file with the new file contents then it deletes the original file and renames or moves the temporary file in place of the original file name. This is called "Safe save" in that the original file can never be accidentally lost because it is never overwritten, only replaced after the new contents is written to the temporary file. Since the original file is deleted in the process, its original permissions (if customized) are also lost.

If you'd like to test, you can try clearing the "Safe save" option from Options > Preferences, Editor / Save and restart Oxygen.
Even though it is mentioned that "it applies only for local files", what that actually means is that it applies only to resources that can be referred as files (path\to\file), this includes UNC paths (Network shares in Windows) and files from network drives.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
im_rem
Posts: 24
Joined: Tue Jun 14, 2022 1:08 pm

Re: Operation not permitted error when trying to open files from a map

Post by im_rem »

Hi,
Are the other files in the same folder as the xpr file, or nested in subfolders?
The parent folder has the domain permission and inheritance enabled. There are files in the same folder as the XPR as well as in sub-folders.
I changed and saved files in both locations: the domain permission is still there for the files except the XPR.
Disabling "Safe save" did not change the behavior.
Our IT department suggested to regularily run a script to add the permission again as a workaround.

Update
With the procmon tool we found out that a XPR copy is created in the user specific temp folder:

Code: Select all

C:\Users\<user name>\AppData\Local\Temp\8\OxygenXMLTemp\oxy_imos NET.xpr<random number>.tempSave.xpr
From there, it is probably moved to the project folder when being saved? According to Microsoft help pages, a file moved into another folder does not automatically inherit the folder's permissions. Is there an option to define a folder other than the user's temp folder?

KR
adrian
Posts: 2867
Joined: Tue May 17, 2005 4:01 pm

Re: Operation not permitted error when trying to open files from a map

Post by adrian »

Hi,

That is indeed the issue with the .xpr file. It is created in the temporary folder, by default located in the user profile. So it inherits the user profile permissions and then moved to the original location.
I've logged an issue to find a solution for this. For future reference it is issue EXM-52626. "Safe save" does not affect the way the project file is saved.
Is there an option to define a folder other than the user's temp folder?
There is no option. You could set the TMP environment variable (which by default points to "C:\Users\<user name>\AppData\Local\Temp") to a different folder before starting Oxygen, but note that it would be preferable to use a local folder. It's a bad idea to use a remote (network share or drive) location for the temporary folder.

Another idea is to give the "OxygenXMLTemp" folder (from the Temp folder) the permissions you want for the .xpr file. But this folder might be purged at some time.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
im_rem
Posts: 24
Joined: Tue Jun 14, 2022 1:08 pm

Re: Operation not permitted error when trying to open files from a map

Post by im_rem »

Ok, thank you.
Post Reply