However, when you are making a website that allows people to upload files to your server, or to append data to an existing file, you need to make sure that the server knows to allow anyone to do that. Usually, when allowing file uploads, you set aside a particular sub-directory that anyone can modify.
For example, in the upload example we went over in class where users can upload images to the server, we allowed them to put the images into a directory called "files". This directory needs to have permissions settings that allow anyone to write to it. In another example we went over in class, when users save their Contact info into a text file, we need to make sure that text file has the proper permissions settings to allow that.
The easiest way to do this is to use WinSCP or some other file transfer program to set the permissions. In WinSCP, you can right-click on any file or folder on the server, and click "Properties". This pops up a dialog that allows you to modify the permissions settings for that file or folder.
Make sure that the folder where users can upload files on your server has Write permissions for both the Owner of the folder and Others.

No comments:
Post a Comment