Jump to content

Recommended Posts

Posted

I found this info on the help site:

Create a folder

Password manage it through cPanel

Remove the index file from it and remove index manager using cPanel for this folder

Create the users in the password manager

 

Bingo! You now have a folder (directory) which is protected by passwords and they can see only that folder. Warning: remember that FTP download access will eat up your bandwidth.

 

Sounds like that would allow download of files if you know the password. But that does not resolve uploading files. :dance:

 

How do I set FTP access to someone to be able to upload/download files from that folder only?

 

AND also what is a good file upload script I can use for the folks I want to upload a file but don't know anything about FTP?

 

I know this has to have been asked so many times you folks are sick to hear it one more time, but didn't see it in my searches.

 

Thanks :)

 

-Samantha

Posted

In cPanel create an ftp user and assign the path to the folder you will allow access. They will only be able to navigate from the folder you specify down, not up.

 

For an HTML upload script have a look at this thread.

Posted
Sounds like that would allow download of files if you know the password. But that does not resolve uploading files.

 

Setting up the FTP account will allow them to upload or downlaod files to that folder only.

 

As an update to the tread that Bruce is referring to, I was able to get the upload feature working and I have set up an example for someone else at www.bsatroop98.org/upload/ where you can look at what I am using and test it if you want. The way I have this set up it uploads the files to a folder called pictures. You can see the files after they are uploaded at www.bsatroop98.org/upload/pictures/. This works well for my users who do not know how to use FTP or who work where a firewall prevents FTP use.

 

You can edit the script to only allow certian file types and you can put a size limit on it. This script does not allow them to delete files, and it will send you an email whenever a file is uploaded. There are others that will allow you to delete from here as well. You can also set passwords on this so that it will require a log in to use. For example password protected upload area is where my users are allowed to upload files.

 

Let me know if you need any help with it if you decide to use it.

 

Kevin

Posted

Thanks Bruce for the cpanel info. I will work on that first.

 

Now I do have a couple quick questions... I have a public_html folder (holds website files) and have a public_ftp folder. Should the upload be directed to a folder under public_html like uploads, or a folder under public_ftp? If I place it under public_html, then why do I have a public_ftp folder???

 

And for the link to that discussion thread. Copied your additonal notes and downloaded the lite file and will try it out in this weekend if I can find time.

 

You said that this was part of the setting:

$dir = "/home/(cpanel login)/{path-to-upload-folder}";

where you replace (cpanel login) with your login and

replace {path-to-upload-folder} with where you intend the uploads to go like "public_html/uploads"

 

I also failed to mention the last config section where you edit in the extensions of the files you will allow to be uploaded. Make sure the file's extension you are uploading is included in the upload.cgi on a separate line.

 

Can you give me a tiny example of the second part? Let's say I only want .tlx and .jpg and .gif files, how would I show that on a separate line of the code?

 

 

 

kajoiner, thank you for your input too! I will try both ways and see which I can get to work easier. I liked that the script that Bruce sent me to can do a bit more (rename adding a number) so will try to implement that first. Always better to have options!

 

-Samantha

Posted

Already downloaded the upload lite file!

 

Ok. Will disregard the public_ftp folder-easy enough to make new folder in public_html!

 

Bruce, what about the second part?

 

I also failed to mention the last config section where you edit in the extensions of the files you will allow to be uploaded. Make sure the file's extension you are uploading is included in the upload.cgi on a separate line.

 

Can you give me a tiny example of the second part? Let's say I only want .tlx and .jpg and .gif files, how would I show that on a separate line of the code?

-Samantha

Posted

Sorry Sam didn't see it.

 

There is a separate section in the upload.cgi script where you add the extensions. One per line like this.

# file types allowed, enter each type on a new line

# Enter the word "ALL" in uppercase, to accept all file types.

@types = qw~

 

txt

jpeg

jpg

gif

 

~;

Posted

Thanks so much for that info.

 

Already set up an FTP folder with limited access for one client, but will need to set up a file upload area for others without FTP experience. Will try that this weekend I hope. For years, I have been using mydocsonline.com for a storage facility which allows me to share files/transfer/upload for customers. Once I get this script set up I can stop paying them for that account! How wonderful!

 

Will let you know if I need further help.

 

-Samantha

Posted

Having Problems....

 

Per instructions above from Bruce, I am trying to implement Upload Lite Script

 

 

- Created an uploads folder in public_html

 

- Modified the cgi script using CuteHTML like this:

 

$dir = "/home/(my loginname, not password)/public_html/uploads";

#$dir = "d:\\html\\users\\html\\images";

 

# absolute URL to folder files will be uploaded to

$folder = "http://www.samisite.com/uploads";

 

added the file extensions I wanted.

 

- set uploads folder to chmod 777

 

- uploaded the cgi script via WSFTP, set to ascii, to my cgi-bin folder

 

 

This is my upload page: http://www.samisite.com/test-csb/upload.htm

 

<form action="http://www.samisite.com/cgi-bin/upload.cgi" method="post" enctype="multipart/form-data">

 

Form fields are FILE1 FILE2 FILE3... as specified.

 

blah blah blah

 

 

Followed ALL the rules, yet I am getting an error and no upload! :)

Do I need my upload page in my main directory instead of a subdirectory?

Will try that next.

 

By the way, the script says

if you're on a UNIX serv, make sure

# you CHMOD each folder in the path to 777

Does that mean my public_html folder must be 777 also for the script to work?

 

-Samantha

Posted
# absolute URL to folder files will be uploaded to

$folder = "http://www.samisite.com/uploads";

 

You need a trailing slash on this line.

$folder = "http://www.samisite.com/uploads/";

 

And the only folder that requires 777 permissions is the uploads folder.

 

Also, the page should be able to function from any path in your domain.

Posted

Thank you for responding so quickly!!!!!!!!!

 

Added the forward slash.

Have a second page to upload from in my main director and still no joy from either page. :)

 

Trying to upload a txt or jpg or gif file. All defined all no go with a server error 500 and it can't find my 404 page either (working from other pages).

 

Dunno what I am doing wrong... gotta be something very simple...

 

-Samantha

Posted

I GOT IT!!!!!!!!!!!!!!!!!!

 

Went back through all steps and checked settings. When I reuploaded the upload.cgi file after adding the slash, I did not reset the file permission to 755! Once I changed that again, all is good!

 

 

THANK YOU BRUCE!! You da Man!

 

-Samantha Thumbs Up

Posted

I will try to digest and summarize this message thread, and add it to the help site in the near future. Thanks, Bruce for helping Sam(antha). I've worked with her for quite awhile on Globalscape's CuteSITE Builder user forum!

 

-kw

  • 2 weeks later...
Posted

Bruce, I love this script. Works well.

 

On one site where I have placed it, they have asked that I modify it so that when you get the confirmation that the files uploaded it shows the files, like it does now, BUT they do not want the second half that also shows ALL files in the folder since that leaves those files available for download, which might be a security issue.

 

I do not know how to modify the script (without disabling the thing) to take out only section. I succeeded in making a mess put it back again. If you could give me a pointer or two on this...

 

 

Kevin, this script is quite nice and would be a great addition to the help site. On my own site, I turned on web protect on the upload page so that only folks I allow can send me files (to limit crud).

 

-Samantha

Posted

I didn't write the script and I am not quite sure how you would go about getting only the files that were uploaded. I know enough Perl to be dangerous. I'll see if I can come up with something.

 

What the script is doing is reading the entire folder to display what files are available.

Posted

Looks like the $20 version (PLUS) has the "Option to display list of files to user. " that is being requested.

 

Will forward the info and see if they want me to go further or let it go.

 

Thanks for the link and heads up.

-Samantha

Posted

STRANGE THING!!!!!!!!!!!!!

 

The permission has changed back to 644 a couple times and I have had to reset to 755... what would do that?

 

-Samantha

Posted

What are you using to set the permissions? File Manager or an FTP program? Try it with an FTP program and see if they stick. If they continue to change open a Help Desk ticket and have one of the techs have a look.

Posted

Somewhat of a different question here...

 

Our site will have TONS of ftp folders (2 per client) and I'd like to keep them separate from our html stuff. Can I create a folder named "ftp_data" (for example) and then add sub-folders off that. The tree would look like this:

 

public_html

|__ftp_data

|__client1

|__client2

|__client3, etc.

 

When I enter new ftp info in cpanel, it seems to default to a folder off public_html. Is there a way to change that?

 

Thanks everyone.

Posted

For the last step just change the folder to what you want.

Example

create a user1 and password1

the set the folder to client1.

You or the client can create folders below client1.

to change the client1 folder to be inside another

just add clients/client1

Be sure to create the above clients folder first

Posted

Thanks, Don.

 

On our current ftp site, we have given out usernames such as "don". Now, I see that cPanel is requiring the addition of "@mysite.com" to the username for login. Is there any way to avoid this? Otherwise, we'll have to notify all of our users to change their usernames.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...