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:

  1. 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.

  2. Change the security settings
    Right click on the upload folder, select properties, then choose the security tab.



  3. 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.
  4. 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:

  5. 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:

  1. 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.

  2. Change the security settings
    Right click on the upload folder, select properties, then choose the security tab.



  3. 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.

  4. Add the specific users to the list of users
    We need to give every user that needs to upload the right permissions.
  5. 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:

  6. 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

  1. Find your upload folder on the server.
    You need to locate the folder where you want to upload to.

  2. 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

  1. 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.

  2. 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.