Still don't understand file upload-folder permissions

后端 未结 4 1773
不思量自难忘°
不思量自难忘° 2021-01-26 02:12

I have checked out articles and tutorials.

I don\'t know what to do about the security of my picture upload-folder.

It is pictures for classifieds which should b

4条回答
  •  北海茫月
    2021-01-26 02:44

    Every newbie mix users up. :)
    You just have to distinguish OS user and website user.
    The latter one has nothing to do with OS permissions.

    For the OS users you have given 2 of them:

    1. FTP user, owner of the files, uploaded via FTP
    2. webserver user, owner of the files uploaded via browser.
    3. Site user, who have no direct access to any files at all.

    So, in case both these users are the same, you have no worry about.
    But usually these are different users. So, one has no access to other's files unless directories has 777 and files 755.
    That's why you have to set 777 for directories.
    As we have learned above that website users has nothing to do with os permissions, you should not worry about security. 777 is ok.

提交回复
热议问题