简体   繁体   中英

Undoing erroneous chmod

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.

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM