Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ahmetozer/c79ef07407be4fe3cf494be59f6ec598 to your computer and use it in GitHub Desktop.
Save ahmetozer/c79ef07407be4fe3cf494be59f6ec598 to your computer and use it in GitHub Desktop.
Fix "Cannot make directory '/run/screen': Permission denied" error

I applied permission to /run/screen folder but every restart requires this fix. So I change the SCREENDIR to home folder. To fix for all users at WSL run below command.

echo 'export SCREENDIR="$HOME/.screen"'

if you start screen outside of bash like command line or scheduled task run with environment variables.

C:\Users\ahmet>bash -c 'SCREENDIR=$HOME/.screen screen'
@stevleibelt
Copy link

thanks, this helped me a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment