Skip to content

Commit f35ee31

Browse files
committed
Improve permission setting part
1 parent 2618fe5 commit f35ee31

1 file changed

Lines changed: 23 additions & 3 deletions

File tree

docs/en/installation.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,35 @@ Ensure **logs** and **tmp** (including all subdirectories) are writable by your
146146

147147
### Quick Setup (Unix/Linux/macOS)
148148

149-
If your web server and CLI users differ, run these commands once:
149+
If your web server and CLI users differ, set permissions for the directories:
150150

151-
```bash
152-
# Auto-detect web server user and set permissions
151+
::: code-group
152+
153+
```bash [Linux with ACL]
154+
# Auto-detect web server user and set permissions using ACL
153155
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
154156
setfacl -R -m u:${HTTPDUSER}:rwx tmp logs
155157
setfacl -R -d -m u:${HTTPDUSER}:rwx tmp logs
156158
```
157159

160+
```bash [macOS / Without ACL]
161+
# Auto-detect web server user and set permissions using chmod
162+
HTTPDUSER=`ps aux | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
163+
sudo chown -R $(whoami):${HTTPDUSER} tmp logs
164+
sudo chmod -R 775 tmp logs
165+
```
166+
167+
```bash [Simple Alternative]
168+
# If auto-detection doesn't work, use broader permissions
169+
chmod -R 777 tmp logs
170+
```
171+
172+
:::
173+
174+
::: warning macOS Note
175+
macOS does not include `setfacl` by default. Use the chmod method or install ACL tools via Homebrew: `brew install acl`
176+
:::
177+
158178
### Make Console Executable
159179

160180
::: code-group

0 commit comments

Comments
 (0)