remove non ascii whitespaces

This commit is contained in:
JMARyA 2024-01-17 09:44:04 +01:00
parent 598a10bc28
commit 5a6d6c4d13
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
117 changed files with 1928 additions and 1928 deletions

View file

@ -46,30 +46,30 @@ Usage: `dufs [OPTIONS] [serve-path]`
| `--tls-key <path>` | Path to the SSL/TLS certificate's private key |
### Access Control
Dufs supports account based access control. You can control who can do what on which path with `--auth`/`-a`.
Dufs supports account based access control. You can control who can do what on which path with `--auth`/`-a`.
```
dufs -a user:pass@/path1:rw,/path2 -a user2:pass2@/path3 -a @/path4
```
1. Use `@` to separate the account and paths. No account means anonymous user.
2. Use `:` to separate the username and password of the account.
3. Use `,` to separate paths.
4. Use `:rw` suffix to indicate that the account has read-write permission on the path.
1. Use `@` to separate the account and paths. No account means anonymous user.
2. Use `:` to separate the username and password of the account.
3. Use `,` to separate paths.
4. Use `:rw` suffix to indicate that the account has read-write permission on the path.
Examples:
- `-a admin:amdin@/:rw`: `admin` has complete permissions for all paths.
- `-a guest:guest@/`: `guest` has read-only permissions for all paths.
- `-a user:pass@/dir1:rw,/dir2`: `user` has complete permissions for `/dir1/*`, has read-only permissions for `/dir2/`.
- `-a admin:amdin@/:rw`: `admin` has complete permissions for all paths.
- `-a guest:guest@/`: `guest` has read-only permissions for all paths.
- `-a user:pass@/dir1:rw,/dir2`: `user` has complete permissions for `/dir1/*`, has read-only permissions for `/dir2/`.
- `-a @/`: All paths is publicly accessible, everyone can view/download it.
### Hide Paths
Dufs supports hiding paths from directory listings via option `--hidden <glob>,...`.
Dufs supports hiding paths from directory listings via option `--hidden <glob>,...`.
```
dufs --hidden .git,.DS_Store,tmp
```
> The glob used in --hidden only matches file and directory names, not paths. So `--hidden dir1/file` is invalid.
> The glob used in --hidden only matches file and directory names, not paths. So `--hidden dir1/file` is invalid.
```shell
dufs --hidden '.*' # hidden dotfiles
@ -79,7 +79,7 @@ dufs --hidden '*.log' --hidden '*.lock'
```
### Log Format
Dufs supports customize [http](../../internet/HTTP.md) log format with option `--log-format`.
Dufs supports customize [http](../../internet/HTTP.md) log format with option `--log-format`.
The log format can use following variables.
@ -91,13 +91,13 @@ The log format can use following variables.
| `$status` | response status |
| `$http_` | arbitrary request header field. examples: `$http_user_agent`, `$http_referer` |
The default log format is `'$remote_addr "$request" $status'`.
The default log format is `'$remote_addr "$request" $status'`.
```
2022-08-06T06:59:31+08:00 INFO - 127.0.0.1 "GET /" 200
```
### Environment variables
All options can be set using [environment variables](../../linux/Environment%20Variables.md) prefixed with `DUFS_`.
All options can be set using [environment variables](../../linux/Environment%20Variables.md) prefixed with `DUFS_`.
| Option | Environment Variable |
| ----------------------- | ---------------------------- |
@ -124,7 +124,7 @@ All options can be set using [environment variables](../../linux/Environment%20V
| `--tls-key <path>` | DUFS_TLS_KEY=key.pem |
### Configuration File
You can specify and use the configuration file by selecting the option `--config <path-to-config.yaml>`.
You can specify and use the configuration file by selecting the option `--config <path-to-config.yaml>`.
The following are the configuration items:
```yaml