I am creating a new forum in a virtual webhost with a common forum package, and the instruction asked me to set some files to 777, is that safe? I had ran the forum in my local computer for months, I used xampp with all security setting I could find online to make it more safe, but I didn't change any permission with those file, did I do something wrong with security?
If a file has 777 permissions, anyone can read or write/delete anything in that folder.
Linux is a multiuser operating system, so you are allowing anyone that can log in to it, whether through SSH or physically through the console, to do anything in that folder.
Any program running as any user has the same privilege as well.
Note that people accessing your forum software don't login, but cause access to files as the user
apache is running as, typically
It would be better to set the owner (
chown) and owner-group (
chgrp) of the file appropriately, and then at the very least
chmod 770 it.
If it's a forum web application running under a typical LAMP stack, you probably want to set the owner and owner-group of this to