Pure PHP Upload 2 Manual
In this list of tutorials you will learn how to create a file upload, restrict certain files or sizes of files from being uploaded, upload files and insert them in a database and much more...
Pure PHP Upload 2.1 Tutorials - Folder security
Setting the folder security on your server
In this tutorial we will explain the following topics.
Introduction
In this tutorial we will explain how to set the security on Windows 2000 and
Linux so users are able to upload to a specific folder using the Pure PHP Upload
extension.
Setting the security so every visitor can upload
To set the right security on Windows 2000 so every anonymous visitor can upload
you need to:
- Find your upload folder on the server.
Go to your server and browse with the Windows explorer your site.
Select the upload folder you created.
- Change the security settings
Right click on the upload folder, select properties, then choose
the security tab.
- Add the anonymous user to the list of users
We need to give every web visitor permission to upload. Because the
users do not login, they all share the same account: IUSR_<machinename>
where machinename is your server name.
So we need to give this account full write permissions. To do so click on
the "Add..." button then select the IUSR_<machinename>
user and click OK.
When you are back at the security setting dialog you need to give this user
also write permissions - so check the appropriate checkboxes:
- Save and you are done
Save the security settings and you are ready to go!
Setting the security so only selected users can
upload
To set the right security on Windows 2000 so only selected users can upload
you need to:
- Find your upload folder on the server.
Go to your server and browse with the Windows explorer your site.
Select the upload folder you created.
- Change the security settings
Right click on the upload folder, select properties, then choose
the security tab.
- Remove "Everyone"
Because we will give only a specific number of users access we need
to remove the group Everyone. To do so just select the group Everyone
and click on "Remove".
Please note that you might need to clear the "Allow inheritable permissions"
checkbox, so your specific permissions aren't overwritten. If you do so choose
to "Copy" existing permissions when asked.
- Add the specific users to the list of users
We need to give every user that needs to upload the right permissions.
To do so click on the "Add..." button then select the user
login and click OK. Do so for all users that need to be able to upload.
When you are back at the security setting dialog you need to also give the
users write permissions - so check the appropriate checkboxes:
- Save and you are done
Save the security settings and you are ready to go!
Setting the security on a linux server using telnet/ssh
- Find your upload folder on the server.
You need to locate the folder where you want to upload to.
- Change the security settings
Type chmod 777 uploadfolder or chmod 666 uploadfolder, the 777 also
alows execute and the 666 only read and write. When you have changed the permission
you should be able to upload to that folder.
Setting the security on a linux server using
ftp
- Find your upload folder on the server.
Go browse with the ftp software you are using to your site. Select
the upload folder you created.
- Change the security settings
Set the right permissions for everyone, the picture can differ depending
on the ftp software you are using. It is called CHMOD, Attributes or Permissions.
Check the help of your program for more info.
DMXzoneGeorge Petrov is a renowned software writer and developer whose extensive skills brought numerous extensions, articles and knowledge to the DMXzone- the online community for professional Adobe Dreamweaver users. The most popular for its over high-quality Dreamweaver extensions and templates.
George is also the founder of Wappler.io - the most Advanced Web & App Builder
See All Postings From George Petrov >>