Can't open a protected document

Discuss various technical topics not related to Mozilla.
Post Reply
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Can't open a protected document

Post by tanstaafl »

I was emailed a scanned image as a .doc attachment that claims it is a protected document that requires Office365 with enable edit and enable content buttons when I try to open it. I saved it as a file and tried a popular utility (Cool File Viewer) that supports .doc files , then Neat Office and then WPS Office from the Microsoft Store. Then I tried Microsoft's online version of Word. No luck.

Content-Type: application/msword; name="Report.doc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Report.doc"

I could try other Office clones such as LibreOffice but that seems like whack a mole. It appears these options breaks the compatibility with other viewers. I had expected at least Microsoft's online version of Word to open it. Suggestions?
User avatar
Grumpus
Posts: 13236
Joined: October 19th, 2007, 4:23 am
Location: ... Da' Swamp

Re: Can't open a protected document

Post by Grumpus »

Look at properties, if admin, see if you can change to your user level.
Also try a simple copy to Linux system to see if properties can be changed?
Doesn't matter what you say, it's wrong for a toaster to walk around the house and talk to you
User avatar
DanRaisch
Moderator
Posts: 127185
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Re: Can't open a protected document

Post by DanRaisch »

The phrase "protected file" makes it sound as though the file was saved from Word or Office365 as a password protected file. If I'm right, you would probably need the password to access that encrypted file.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Can't open a protected document

Post by tanstaafl »

I believe this attachment is a scan of the paid invoice from a moving company that they're sending me several weeks after the move. I don't think they're deliberately trying to protect it, I suspect they just assume everybody has Office365 just like many people used to assume everybody has Office. I sent them a email complaining that I can't open it and suggesting they send me a ordinary PDF file instead. I suspect I will eventually get that, I'm viewing this more as a learning opportunity.

Its not a file access rights problem. I can see the raw source using Notepad for example. I checked the files properties, including the security tab. I can modify, read & execute, read and write it. If it was password protected (which doesn't make sense given who sent it to me) I would have expected the online version of Word to prompt me for the password.

In WPS Office when I open the file it shows (as the contents, not as a popup):

Image

It seems to be due to some attributes stored within the file that the viewing application correctly interprets as restrictions. In WPS Office I went to the Review -> Restrict Editing menu but couldn't find anything relevant. I looked at the encryption settings for the document and it wasn't encrypted or password protected.
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: Can't open a protected document

Post by morat »

I would try to open the document in the desktop version of Word at a local library.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Can't open a protected document

Post by tanstaafl »

morat:

My goal is to understand what's going on and figure out how to display the contents using non-Microsoft software. i.e. how to workaround vendor lock-on. If I just wait a few days I think the moving company will send me a version in a different file format that I can read.

The free version of MS Office in Windows 10 jumps to the online version of Word. It doesn't have the file -> options -> trust center you need to disable protected view. I assume the premium version does.

https://www.digitalwelt.org/en/tips/sof ... ected-view
https://www.howtogeek.com/60310/enable- ... cted-view/
https://www.isunshare.com/blog/disable- ... e-editing/

At Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Word\ I created Security\ProtectedView and then added a DWORD (set to 1) for DisableAttachementsInPV , DisableAttachementsInPV and DisableUnsafeLocationsInPV . Supposedly that's supposed to disable ProtectedView by default for Word. It didn't do any good using the free version of MS Office or with WPS Office.

https://support.microsoft.com/en-us/top ... bcdbcb6653 is interesting though that seems to apply only if you are using Microsoft software.
v_v
Posts: 157
Joined: September 18th, 2021, 8:57 am

Re: Can't open a protected document

Post by v_v »

tanstaafl,

I think that morat is correct. You will need a Microsoft Office program to correctly open the document. If I read the wording correctly from your image it is not the "password protect" feature, it is something else that I do not know the name of. But at work where we used Microsoft Office programs I would always get Word docs and Excel spreadsheets---and if I remember correctly Outlook items too, that had the little buttons that said "Enable Editing" or "Enable Content". But it has been too long ago now and I do not have recent Office programs at home to verify.

Okay, I just looked some of the issues up. The mechanism relates to the "Trust Center" as sort of a "Protect" document feature in Office programs. As a result I suspect that non-Microsoft programs will have no effects, as you have found out so far. So yes, as morat suggested try to get to a Microsoft program somewhere to see if you can manipulate these trusted document features---or wait on the pdf!

It also occurs to me now why it is set at "protected". As these are "paid invoices" the vendor would not want somebody just going into these invoices and making changes or manipulating them. So probably the systems admin has just automatically set everyone's "Trust Center" settings to produce the results that you have experienced.

[Edit --- Okay, you were typing your post while I was typing mine. As you tests indicate you might not be able to use a non-paid version of Microsoft or a non-Microsoft program to work around the issue. But the vendor can certainly reset those documents so that you can open them.]

v_v
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: Can't open a protected document

Post by morat »

Protected View > [check] Enable Protected View for files originating from the Internet

When a file is downloaded from the Internet, it is assigned a zone information. Try removing the zone information with the streams utility.

NTFS Alternative Data Streams
http://borncity.com/win/2018/09/23/info ... a-streams/
http://docs.microsoft.com/en-us/sysinte ... ds/streams

Command Prompt:

Code: Select all

rem show alternate data streams and zone information
dir /r example.doc
more < example.doc:Zone.Identifier
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Can't open a protected document

Post by tanstaafl »

PS D:\downloads> get-content wood_report.doc -Stream Zone.Identifier
[ZoneTransfer]
ZoneId=3
HostUrl=about:internet



D:\Downloads>D:\downloads\streams\streams64.exe -d wood_report.doc

streams v1.60 - Reveal NTFS alternate streams.
Copyright (C) 2005-2016 Mark Russinovich
Sysinternals - http://www.sysinternals.com

D:\Downloads\wood_Report.doc:
Deleted :Zone.Identifier:$DATA

Unfortunately that didn't have any effect.
Post Reply