Post by s***@home.netI'm using Windows 7 Ultimate.
Neither Windows Media Player nor VLC can play any audio or video file.
I keep getting the following error message.
"Windows Media Player cannot access the file. The file might be in
use, you might not have access to the computer where the file is
stored or your proxy settings might not be correct"
I also did download the K-Lite Codec pack to see if that was the
problem. It wasn't.
Anyone have any idea what the hey is wrong?
Now, see, this is an example of an absolutely useless error message.
In the past, we would get some information such as:
"Cannot open C:\users\joanne\Downloads\sample.mp4
Error 5 "
I would look at that and conclude Sam is a different person than Joanne,
Sam has tried to access a file "owned" by a different person. Codes
ending in "5" tend to be permission problems.
When comparing the behavior of WinXP to Windows 7, WinXP could be
installed on FAT32 as well as NTFS. If installed on FAT32 (which doesn't
have permissions or ACLs or stuff of that nature), Sam could access
Joannes files any time Sam wanted. That's a "flat access model"
with no privacy at all. Not really a multi-user environment as such.
Windows 7 installs on NTFS, and NTFS definitely has permissions and
ownership. We may be deceived, by running an account which is
a member of Administrators group, that we can do whatever we want,
like it was some WinXP situation. But that's not really going to always
be the case. If I go to Control Panels, and use the thing for user account
changes, I could make accounts without Administrator.
As an example, one of my installs has a user called LowBoy. That's an
account without Administrator. If I need to investigate a permissions
situation, I would log in as LowBoy and... see what works. LowBoy
account cannot install software. LowBoy account cannot read Joannes
files with VLC. LowBoy is such a sad cowboy because "nothing works".
But the experience is valuable, because in business environments, all
the regular staff are "LowBoy" and they can't do anything. Maybe I
could attach "sample.mp4" to an email and send it to you, and that
offers an opportunity for the software to stamp the ownership
with "LowBoy" so I can open the sample.
*******
When they make utilities for this, the utility "does not solve any problems".
I can hardly tell the difference, looking at this, how this differs
from the Security tab of the file Properties display.
https://learn.microsoft.com/en-us/sysinternals/downloads/accessenum
While that could display some information for you, and hint at
why VLC cannot open a file, I at least am too thick to spot
a pattern in there that I can use to solve a problem.
*******
If you bring over a hard drive from the WinXP machine, even if the
ownership of the NTFS file was "Sam" on the WinXP machine, and
you are logged in as "Sam" on the Windows 7 machine, those
two accounts have different SIDs (non-domain environment).
This means, you may discover that you have no access to the files
on the data partition from WinXP.
The way NTFS works, is a file can have multiple owners. You can
in fact, have both "ForeignSam" and "LocalSam" own the file at the same
time and access it. We need Takeown for this.
itsmine.cmd
-----------
takeown /f %1 /r /d y
icacls %1 /grant administrators:F /t
Do NOT apply that command to the top of C: !
Permanent damage could result. It's for D: data-only partitions.
That command is appropriate for selected work on a disk drive
imported from another machine (and not their Windows partition either).
When you belong to Administrators group, there is an "implicit Takeown"
when you attempt to click on folders on the foreign partition. In cases
like that, you are saved the trouble of changing the permissions manually.
*******
I would estimate the permissions model is fifty years behind the
rest of the software. The computer should be able to explain to you,
what is happening and why something does not work. There's no need
for every situation on the machine to be turned into a puzzle.
As an example, this command records the permissions in a text file for later.
On a data partition, the "DErr.txt" will be almost empty, because there aren't
a lot of "challenges" on data drives. It's when you run the command on C:
that the error file has 50+ entries in it (could be reparse points).
icacls d:\ /save "DPerms.txt" /t /c > "DErr.txt" 2>&1
Permissions can be played back too. This allows a person as administrator,
to make a mess, and then "clean up before they leave". Things which caused
errors, the playback can't do anything about them (it won't be trying to
change any reparse points perhaps).
Movies
D:(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)(A;ID;0x1200a9;;;BU)(A;OICIIOID;GXGR;;;BU)
Movies\sample.mp4
D:(A;ID;FA;;;BA)(A;ID;FA;;;SY)(A;ID;0x1301bf;;;AU)(A;ID;0x1200a9;;;BU)
When I look at the Security tab on "sample.mp4", the order of the entries is:
Authenticated Users <=== AU
SYSTEM <=== SY
Administrators BA?
Users BU?
The Administrator has Full control, so "FA" must be "Full Access".
Some of the abbreviations make a bit of sense, but generally speaking,
interpreting this is just about impossible. The examples are the
simplest of cases. They could be "yards long" in your daily job
as an IT guy. They also put "long recognizable strings" instead of
abbrevations in that file, and when you see a file cluttered with
those, one of your eyeballs will fall out :-)
That's a very quick trip, into permissions.
When ForeignSam owns a file, and you check the ownership, instead of "Sam"
the identifier is a number such as the "thing" on the end here. First of
all, when you install the OS, the user accounts are assigned starting from 1000.
So 1001, it makes sense that ForeignSam might have a low number like 1001.
The three clusters of digits, are randomly defined during OS install time.
The S-1-5-21 is a canonical part. There is a list of "well-known SIDs" that
help an Administrator understand this format of ownership.
(A;OICI;FA;;;S-1-5-21-3403405434-1121005857-2491829107-1001)
You almost need a continuing education course, to help you decode pages like this.
https://learn.microsoft.com/en-us/windows/win32/secauthz/well-known-sids
Summary: When a file won't open, there could be a reason.
Don't ask me to explain it though. I need a course!
I like it better when there is a path and an error code.
Paul