Troubleshooting: Logged In But Can’t Access a File
The user is logged in. They have the right role. The file still won’t open. What now?
This is the single most common Media Guard support question. There’s almost always one of four causes, and you can check each in under a minute.
1. Check the shortcode
Edit the page that holds the file. Look closely at the shortcode and confirm:
- The
file="…"name exactly matches the filename in Media Guard → File Manager — including case and the file extension (.pdf,.mp4, etc.). - The
roles="…"value uses the role’s slug, not its display name. Subscriber →subscriber. NotSubscriber. NotSubscribers. - The
groups="…"value matches a real group name from the File Manager (Pro).
2. Check the user actually has the role
Go to Users → All Users in your WordPress dashboard. Find the test user. Check their role in the Role column.
If a membership or LMS plugin was supposed to assign that role automatically, this is the #1 place that breaks. The plugin’s automation can fail silently and leave the user role-less.
Quick fix: edit the user, set the correct role manually. If that fixes access, the bug is in the other plugin’s automation, not Media Guard.
3. Test as a non-admin
Administrators always bypass protection. If you’re testing while logged in as an admin, every file will open for you — even if the rules would deny everyone else.
Always test in an Incognito / Private window, signed in as a regular test user. Make a dummy account with the role you want to verify.
4. Clear cache
Aggressive page caching plugins (W3 Total Cache, WP Rocket, LiteSpeed Cache, Cloudflare APO, etc.) sometimes serve a stale “logged-out” version of the page to logged-in users. That makes Media Guard look broken when the page itself is stale.
- Exclude the Media Guard streamer URL from caching. The path includes
?mg_stream=. - Exclude logged-in users from caching entirely if possible.
- If you use Cloudflare, make sure the page isn’t being cached at the edge for logged-in sessions.
Still stuck? Diagnostic checklist
- In Incognito, hit the file URL directly. Do you get a “log in” message? If yes, protection is working.
- Log in as your test user. Does the role show correctly in their profile?
- Hit the file URL again. Does the file open? If yes — your page or its shortcode is the problem (probably a typo).
- Still no? Disable your caching plugin temporarily and reload.
- Still no? Check the file’s group assignment in File Manager (Pro). Make sure the user is in that group.
FAQ
The page loads but the file gives an “access denied” message. The page is public. Only the file itself is protected. This is normal — the protection is doing exactly what it should. If you want the entire page private, gate the page with your membership plugin too.
The shortcode just shows up as text on my page. WordPress isn’t processing it. Either the page editor put it inside a Code block (remove it), or the shortcode brackets were typed as HTML entities by mistake. Use real [ and ] in the page editor.
I keep getting “missing file attribute”. The shortcode needs at least a file="…" or a groups="…" attribute. One or both must be present.
Related Pro features
When access doesn’t work as expected, Pro makes diagnosing it dramatically faster.
- Access Log — Look up the exact deny reason for any user / file in one screen.
- Groups & Users — Confirm the user is in the group you think they’re in.
- Pro Features Tour — Tour every Pro screen that makes troubleshooting one step instead of five.