chore: update readme

pull/511/head
sigoden 2024-12-20 09:52:51 +08:00
parent ac15ae4e8e
commit f1c9776962
1 changed files with 1 additions and 8 deletions

View File

@ -244,7 +244,7 @@ dufs -a user:pass@/:rw,/dir1 -a @/
- `-a user:pass@/:rw,/dir1`: `user` has read-write permissions for `/*`, has read-only permissions for `/dir1/*`.
- `-a @/`: All paths is publicly accessible, everyone can view/download it.
> There are no restrictions on using ':' and '@' characters in a password. For example, `user:pa:ss@1@/:rw` is valid, the password is `pa:ss@1`.
**Auth permissions are restricted by dufs global permissions.** If dufs does not enable upload permissions via `--allow-upload`, then the account will not have upload permissions even if it is granted `read-write`(`:rw`) permissions.
#### Hashed Password
@ -264,13 +264,6 @@ dufs -a 'admin:$6$tWMB51u6Kb2ui3wd$5gVHP92V9kZcMwQeKTjyTRgySsYJu471Jb1I6iHQ8iZ6s
```
> The hashed password contains `$6`, which can expand to a variable in some shells, so you have to use **single quotes** to wrap it.
Or embed a command to dynamically generate a hashed password:
```sh
dufs -a admin:$(openssl passwd -6 123456)@/:rw
dufs -a admin:$(mkpasswd -m sha-512 123456)@/:rw
```
Two important things for hashed passwords:
1. Dufs only supports sha-512 hashed passwords, so ensure that the password string always starts with `$6$`.