0

Am working in Django and was trying to serve media files and was encountering an error with accessing the system folder serving media files. Being (much) less familiar with terminal-related commands, I searched SO for a solution. I ended up executing the "good" code in this SO answer. This part, specifically:

sudo groupadd varwwwusers
sudo adduser www-data varwwwusers
sudo chgrp -R varwwwusers /var/www/
sudo chmod -R 770 /var/www/

This somehow messed up my whole system. I can't even start gunicorn now, I'm getting OSError: [Errno 13] Permission denied: '/apps/djangoProjectFolder' in my terminal output when I try to do so.

I'm basically clueless at this point. Would like to learn what I did wrong, and how I can undo this situation.

gx14
  • 263
  • 2
  • 13
  • Hard to tell what you did, but if you didn't do those commands exactly, the potential for mayhem is large. For example, one extra space, as in: `sudo chmod -R 770 / var/www/` or `sudo chmod -R 770 /var/www /` would change the file modes on every file on your system. – John Hascall Feb 13 '16 at 18:08

1 Answers1

0

Thanks for the comment. I ended up doing a clean reinstall of Unbuntu. All fixed now! Just that it was really laborious to manually transfer all my existing files since wholesale copy+pasting didn't work (seemed like the erroneous permissions got copied over too).

gx14
  • 263
  • 2
  • 13