generated from nginx/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 112
clarify allowed upload directories #1020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rishabh-f5
wants to merge
7
commits into
nginx:main
Choose a base branch
from
rishabh-f5:NLB-5699-improve-docs-on-allowed-directories
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f755565
clarify allowed upload directories
rishabh-f5 2b15838
add missing worker-writable directories
rishabh-f5 89f904c
add App Protect directory to filesystem
rishabh-f5 ce2f4b6
Merge branch 'main' into NLB-5699-improve-docs-on-allowed-directories
rishabh-f5 6c81899
update filesystem restrictions
rishabh-f5 b444c97
refactor file system table and restrictions
rishabh-f5 07c34a6
Merge branch 'main' into NLB-5699-improve-docs-on-allowed-directories
rishabh-f5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,21 +25,33 @@ The topics below provide information on NGINX configuration restrictions and dir | |
NGINX configurations stored in GitHub can be applied to existing NGINXaaS for Azure deployments using custom GitHub Action workflows. See [NGINXaaS for Azure Deployment Action](https://github.com/nginxinc/nginx-for-azure-deploy-action) for documentation and examples on how to incorporate these workflows in your GitHub Actions CI/CD pipelines. | ||
|
||
## NGINX filesystem restrictions | ||
NGINXaaS for Azure places restrictions on the instance's filesystem; only a specific set of directories are allowed to be read from and written to. Below is a table describing what directories the NGINX worker process can read and write to and what directories files can be written to. These files include certificate files and any files uploaded to the deployment, excluding NGINX configuration files. | ||
|
||
{{< table >}} | ||
| Allowed Directory | NGINX worker process can read/write to | Files can be written to | | ||
|------------------ | ----------------- | ----------------- | | ||
| /etc/nginx | | ✓ | | ||
| /opt | ✓ | ✓ | | ||
| /srv | ✓ | ✓ | | ||
| /tmp | ✓ | | | ||
| /var/cache/nginx | ✓ | | | ||
rishabh-f5 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /var/www | ✓ | ✓ | | ||
NGINXaaS for Azure places restrictions on the instance’s filesystem; only a specific set of directories are allowed to be read from and written to. Below is a table describing what directories the NGINX worker process can read and write to and what directories files can be written to. These files include certificate files and any files uploaded to the deployment, excluding NGINX configuration files. | ||
|
||
{{< table >}} | ||
|
||
| Directory | Master Read | Master Write | Worker Read | Worker Write | Recommended Use | | ||
|-------------------|:-----------:|:------------:|:-----------:|:------------:|----------------------------------| | ||
| /etc/nginx/ | ✔️ | ✔️ | ❌ | ❌ | Certificates, keys | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NGINX config files are recommend here |
||
| /opt/ | ✔️ | ✔️ | ✔️ | ❌ | Application files (e.g. Lua scripts) | | ||
| /srv/ | ✔️ | ✔️ | ✔️ | ❌ | Application files | | ||
| /var/www/ | ✔️ | ✔️ | ✔️ | ❌ | Static files (e.g. index.html) | | ||
| /tmp/ | ✔️ | ✔️ | ✔️ | ✔️ | Temporary files | | ||
| /var/cache/nginx/ | ✔️ | ✔️ | ✔️ | ✔️ | Cache data | | ||
|
||
{{< /table >}} | ||
|
||
Attempts to access other directories will be denied and result in a `5xx` error. | ||
|
||
```plaintext | ||
/etc/nginx/ # Certificates, keys (master only) | ||
/opt/ # Application files (worker read-only) | ||
/srv/ # Application files (worker read-only) | ||
/var/www/ # Static files (worker read-only) | ||
/var/cache/nginx/ # Cache data (worker read/write) | ||
/tmp/ # Temporary files (worker read/write) | ||
``` | ||
|
||
## Disallowed configuration directives | ||
Some directives are not supported because of specific limitations. If you include one of these directives in your NGINX configuration, you'll get an error. | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This docs says the same thing in four ways:
I think that's a lot more confusing than what we had. If AI wrote this, please keep in mind the F5 AI policy, especially
How about we just stick to the table and delete the other three?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the four methods that @ryepup noted leads to inconsistencies such as https://github.com/nginx/documentation/pull/1020/files#r2334077715 .