0

I have a Raspberry Pi 4 running the default OS and VNC has been turned on and working for many weeks now. Suddenly today I tried to connect to the RPi using the VNC client on my iPhone and an error occurred. The error message shown is An authentication error occurred. See the VNC Server error log for details. I ran the following commands and got these results:

cat /var/log/syslog | grep vnc | tail

[...]
Apr 28 22:06:37 raspberrypi vncserver-x11[623,root]: Connections: connected: 192.168.0.204::60769 (TCP)
Apr 28 22:06:46 raspberrypi vncserver-x11[623,root]: SAuthUserPasswd: Auth error: /: permissions are not restrictive enough
Apr 28 22:06:46 raspberrypi vncserver-x11[623,root]: Connections: disconnected: 192.168.0.204::60769 (TCP) ([AuthError] An authentication error occurred.  See the VNC Server error log for details.)

sudo cat /var/log/vncserver-x11.log

[...]
<13> 2022-04-30T18:50:18.417Z raspberrypi vncserver-x11[613]: Connections: connected: 192.168.0.204::61654 (TCP)
<14> 2022-04-30T18:50:18.421Z raspberrypi vncserver-x11[613]: SConnection: Client needs protocol version 5.0
<14> 2022-04-30T18:50:18.421Z raspberrypi vncserver-x11[613]: SProtoV5Up: Choosing cipher suite RA4_128 [0x0202] (algorithms: RSA-OAEP, ECDHE-Curve25519, SHA-256, AES-GCM-128)
<14> 2022-04-30T18:50:18.507Z raspberrypi vncserver-x11[613]: SAuthProtoImpl: Offering auth method UserPasswd(1) [required=1]
<14> 2022-04-30T18:50:18.512Z raspberrypi vncserver-x11[613]: SAuthProtoImpl: Client chose auth method UserPasswd(1)
<11> 2022-04-30T18:50:27.658Z raspberrypi vncserver-x11[613]: SAuthUserPasswd: Auth error: /: permissions are not restrictive enough
<13> 2022-04-30T18:50:27.658Z raspberrypi vncserver-x11[613]: Connections: disconnected: 192.168.0.204::61654 (TCP) ([AuthError] An authentication error occurred.  See the VNC Server error log for details.)
<14> 2022-04-30T18:50:27.659Z raspberrypi vncserver-x11[613]: SMsgWriter: framebuffer updates 0
<14> 2022-04-30T18:50:27.659Z raspberrypi vncserver-x11[613]: SMsgWriter:   CopyRect rects 0, bytes 0, pixels 0
<14> 2022-04-30T18:50:27.659Z raspberrypi vncserver-x11[613]: SMsgWriter:   raw bytes equivalent 0, compression ratio nan

(these lines appear every time I try to connect)

I really don't understand why this stopped working all of a sudden. Although I have services like docker and home assistant running continuously, I did not install or change anything myself in between VNC working and not working.

I have searched for this error to understand what it means and how to solve this but have really found nothing related to VNC or even just this error message in general.

4
  • "See the VNC Server error log for details" - so what's in there? /var/log/vncserver-x11.log
    – Dougie
    Apr 30 at 16:46
  • @Dougie edited the question. What appears is basically the same, and the error is exactly the same.
    – Alex
    Apr 30 at 18:52
  • You're going to have to ask the RealVNC folks at help.realvnc.com/hc/en-us/community/topics Or try a fresh copy of RaspiOS Bullseye 22-04-22 and see if that gets the same failure.
    – Dougie
    May 1 at 11:10
  • @Dougie Currently it's not possible for me to try a fresh install, but as another person wrote in an answer that has since been deleted, this exact error was also happening for them with a fresh install.
    – Alex
    May 1 at 11:38

1 Answer 1

1
Auth error: /: permissions are not restrictive enough

Ensure that the / folder is owned by root and its permission mode is set to 755:

chown root.root /
chmod 755 /

You may also need to check these permissions for /usr folder

chown root.root /usr
chmod 755 /usr

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.