# Accidentaly ran jmavsim as root

**URL:** <https://discuss.px4.io/t/accidentaly-ran-jmavsim-as-root/25226>\
**Category:** PX4 Autopilot\
**Created:** [November 26, 2021, 5:57pm UTC](https://discuss.px4.io/t/accidentaly-ran-jmavsim-as-root/25226 "2021-11-26T17:57:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![therealrel](https://discuss.px4.io/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@therealrel](https://discuss.px4.io/u/therealrel)\
**Post date:** [November 26, 2021, 5:57pm UTC](https://discuss.px4.io/t/accidentaly-ran-jmavsim-as-root/25226/1 "2021-11-26T17:57:54Z")

</div>

Hello

I was using jmavsim and it worked perfectly fine. Then i once tried to run it with sudo (I cant remember why). After that it didn’t work anymore and the console shows the following output. Is there anything I can do to fix this, or do I have to reinstall my Ubuntu (last option).

```auto
[0/1] cd /home/aurel/Documents/Focusproject/Code/PX4-Autopilot/build/px4_sitl_default/tmp && /home/aurel/D...cusproject/Code/PX4-Autopilot /home/aurel/Documents/Focusproject/Code/PX4-Autopilot/build/px4_sitl_default
SITL ARGS
sitl_bin: /home/aurel/Documents/Focusproject/Code/PX4-Autopilot/build/px4_sitl_default/bin/px4
debugger: none
program: jmavsim
model: none
world: none
src_path: /home/aurel/Documents/Focusproject/Code/PX4-Autopilot
build_path: /home/aurel/Documents/Focusproject/Code/PX4-Autopilot/build/px4_sitl_default
empty model, setting iris as default
SITL COMMAND: "/home/aurel/Documents/Focusproject/Code/PX4-Autopilot/build/px4_sitl_default/bin/px4" "/home/aurel/Documents/Focusproject/Code/PX4-Autopilot/build/px4_sitl_default"/etc -s etc/init.d-posix/rcS -t "/home/aurel/Documents/Focusproject/Code/PX4-Autopilot"/test_data
Creating symlink /home/aurel/Documents/Focusproject/Code/PX4-Autopilot/build/px4_sitl_default/etc -> /home/aurel/Docume
ERROR [px4_daemon] error binding socket /tmp/px4-sock-0, error = Address already in use

________  _____ 
| ___ \ \ \ / / / |
| |_/ / \ V / / /| |
| __/ / \ / /_| |
| | / /^\ \ \___ |
\_| \/ \/ |_/

px4 starting.

INFO [px4] Calling startup script: /bin/sh etc/init.d-posix/rcS 0
INFO [init] found model autostart file as SYS_AUTOSTART=10016
ERROR [px4_daemon] error connecting to socket: Permission denied
[param] parameter file not found, creating eeprom/parameters_10016
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
ERROR [px4_daemon] error connecting to socket: Permission denied
Error: no autostart file found (/home/aurel/Documents/Focusproject/Code/PX4-Autopilot/build/px4_sitl_default/tmp/rootfs/etc/init.d-posix/airframes/ERROR [px4_daemon] error connecting to socket: Permission denied_*)
ERROR [px4] Startup script returned with return value: 256

```

Thanks for helping!

---

<div class="post-metadata">

**Author:** ![JaapSkinner](https://discuss.px4.io/user_avatar/discuss.px4.io/jaapskinner/32/14317_2.png) [@JaapSkinner](https://discuss.px4.io/u/JaapSkinner)\
**Post date:** [August 29, 2023, 11:24am UTC](https://discuss.px4.io/t/accidentaly-ran-jmavsim-as-root/25226/2 "2023-08-29T11:24:19Z")

</div>

Hi did you ever find solution to this? just tried building for first time and got all the way to this and then hit permission denied. I am using wsl2 on win 11
