Skip to content

Find your user id and group id on MacOS

Find your user id and group id on MacOS

Devilbox maps the devilbox user inside containers to your macOS user. Set NEW_UID and NEW_GID in .env.

Open a terminal and run:

Terminal window
id -u
id -g

Example output:

501
20

Use the first number as NEW_UID; the second as NEW_GID.

Edit .env

Run:

Terminal window
cp -n env-example .env
nano .env

Set:

NEW_UID=501
NEW_GID=20

Restart:

Terminal window
./dvl.sh down
./dvl.sh up

Verify

Terminal window
./dvl.sh shell

Enter PHP and check ownership:

Terminal window
id
touch /shared/httpd/uid-check.txt
exit
ls -l data/www/uid-check.txt
rm data/www/uid-check.txt

The file owner should match your macOS user. If not, recheck NEW_UID and NEW_GID against id -u and id -g; then review prerequisites.