Secure way to store files in web server?

前端 未结 7 597
自闭症患者
自闭症患者 2020-12-24 03:00

I want my files to be secure in my web server. Only authenticated users to access those files should be able to access those files. I thought of storing files in database as

7条回答
  •  暖寄归人
    2020-12-24 03:19

    A few options come to mind.

    If you are using Apache you can use htaccess to password protect directories. (first googled link : http://www.javascriptkit.com/howto/htaccess3.shtml)

    or Store the files above the web server. Create a script in php that will allow authorised users to access them.

    If you want to do it Via FTP, and you are running cpanel you may be able to create new ftp accounts. check yourdomain.com/cpanel to determine if you have it installed.

提交回复
热议问题