If I upload a copyrighted file "c.file" for which I am not the copyright holder to Dropbox, no one cares. If I share it, then it becomes an issue (and of course Dropbox has things to prevent this). However, if I put c.file on my own webpage, with no security of any kind, this is file sharing, which is illegal for copyrighted files. If I want to use my server as a personal cloud storage like Dropbox, what do I need to do in order to be within my legal rights to serve copyrighted material? Is a simple password protection enough? Or do I need to achieve some particular level of security?
It's not illegal to post your own files where others can easily download or share them on your own server or a public website. That happens every second of every day on the Internet, in libraries, etc. The copyright is yours by default.
...what do I need to do in order to be within my legal rights to serve copyrighted material?
If you're talking about files that other people hold the copyright to that will reside on your server: you need to have legal permission and/or license from the copyright holders of other files to serve the files.
It's illegal to share files where you don't own the copyright or have a license to. Dropbox - as well as other file sharing sites - cover their policies towards illegal filing sharing of copyrighted files in their TOS. They can delete/lock your account and/or cooperate with legal authorities.
"You're responsible for your conduct. Your Stuff and you must comply with our Acceptable Use Policy. Content in the Services may be protected by others' intellectual property rights. Please don't copy, upload, download or share content unless you have the right to do so. We may review your conduct and content for compliance with these Terms and our Acceptable Use Policy. With that said, we have no obligation to do so. We aren't responsible for the content people post and share via the Services." https://www.dropbox.com/terms
When you sign up, you also agree to their TOS to serve your own files that you own the copyright to. You don't give Dropbox the copyright to your files when you upload.
As for password protection of the copyrighted material to prevent others from copying: protection against copying the files by other users is a different issue than owning the copyright (to your files) or having a license to distribute copyrighted files on a server.
Your level of server security is your decision - and be sure to consider state/federal laws which may apply to certain information, like financial data - to make in order to protect the material from others that you have copyright permissions to serve to users.
The best level of server security is what you arrange (and possibly guarantee under a contract) with the owners of any copyrighted material on your server.
If the files are your own files on your own server, your security is what you want: password or none.