question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Access denied." on certain files

See original GitHub issue

Ever since removing the PHP plugin and installing the PHP5.6 and PHP7.0 plugin I have been having issues with not being able to view certain files. I have attempted to set security.limit_extensions but this does not resolve the problem.

2016/05/12 12:05:08 [error] 7059#7059: *26 FastCGI sent in stderr: "Access to the script '/srv/example/index.txt' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 82.177.68.16, server: example.com, request: "GET /index.txt HTTP/1.1", upstream: "fastcgi://unix:/var/run/ajenti-v-php7.0-fcgi-360-php7.0-fcgi-0.sock:", host: "example.com"

Examples: http://example.com works (contains index.php) http://example.com/index.php works http://example.com/index.html does not work http://example.com/index.txt does not work http://example.com/index does not work (contains index.php) http://example.com/index/ works (notice the trailing /) http://example.com/index/index.php works

No configuration has been done other than adding PHP 7.0 (alternatively 5.6) FastCGI to Content and attempting to set security.limit_extensions

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
Ardakiliccommented, May 18, 2016

Thanks man! 🙇

0reactions
edioicommented, Aug 18, 2016

Hi @Ardakilic, thanks for the help I sort it out although the answer sounds simple. You’re right on a fresh installed ajenti, set [^/].php(/|$) and regex in the content type is enough to make it work (Ubuntu 16.04.1 LTS). I didn’t notice the error.log changed from see security.limit_extensions error to 13 permission denied until this morning. This is the test server, so I copied some site from the /srv to this test server and I am quite sure I’ve done the ownership and permission thing, checked by ls -l. I deleted the copied data and created the directory from ajenti general directly and uploaded file by FTP and then everything works fine. I don’t understand why but hope some one can point it out to me. No need to give +x to files as somewhere mentioned that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 "Access Denied" Folder Errors: 5 Easy Fixes
The most common fix to try when you see "folder access denied" is to take ownership of the folder through the File Explorer....
Read more >
How To Fix Folder Access Denied in Windows - Alphr
1. Hold down Win + R to open "Run." 2. Type "control userpasswords2" in the dialogue box that opens and tap "OK." 3....
Read more >
Access Denied When Copying Files Windows 10/8/7 - EaseUS
Access Denied When Copying Files Windows 10/8/7 ; 1. Take the Ownership of the File or Folder. Open "Windows Explorer" and locate the...
Read more >
[Solved!] Folder access denied? 4 best methods! | DiskInternals
Solution 1. Change folder ownership ... It may happen that you are not the owner of this folder. But that can be fixed!...
Read more >
Fix Access Denied Errors with Ease [CMD, Hard Drive, Folder]
How do you fix Access Denied? · 1. Take ownership of the directory; 1.1 Automatically assign permissions; 1.2 Manually assign permissioms · 2....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found