View Full Version : FTP folder with limited read/write.
AndrewMT
6-24-03, 01:43 AM
I need to create a ftp account where a user can sign in and upload files. They cannot, however, delete or read any of the files in the folder. This only has to be one account with just one user/pass.
this is impossible fyi. The only way to can come close to this is setting the existing files in the directory read only for the user and setting r/w for you and your group on the directory. this won't prevent them from deleting files they have already uploaded.
Sounds like you need a php file upload script rather than using ftp. There are many threads in this forum on the subject. For example:
http://forum.powweb.com/showthread.php?s=&threadid=19172&highlight=upload
AndrewMT
6-24-03, 02:41 AM
Well, I've been on other people's ftps before and they do not allow delete. How is that possible?
Can't tell you what other hosts provide, or how they do it. Just can tell you what Powweb supports.
Some other hosts offer anonymous FTP, and you can set the protection such that the anonymous login can upload only and not have other permissions. PowWeb doesn't offer anonymous FTP.
The upload script is probably the way to go.
this can be done very easily using http. I just set up almost exactly what you described. users can upload files and view files uploaded by others. Email me at tripschoppers@attbi.com
Tell us what you did. You have my curiousity up.
my board experience in the past has been general discusisons only, most things like this would be handled via Email, I will remember this and change my ways. I should have realized after the help from you B&T. By the way, for those interested, I am still working on a tutorial for a menumagik style menu set, should be done soon.
Anyhow, as of right now, my entire site is password protected via .htaccess folders, with directory browsing shut off.
I set one folder to allow for directory browsing and put a couple files into it, one being the .htaccess file, one being a simple .html form. you can look at it here,
NOTE: DO NOT SUBMIT, IT WILL NOT WORK. this is a second site, not my main one, I use it for viewing only, there are no scripts installed
http://home.attbi.com/~tripschoppers/click_this_to_upload.htm
feel free to use the html from that page, just change the location and name of the upload script..
I used psuploader, the free version and tweaked a couple lines. I set the redirect in the upload.cgi script to go to the directory after uploading, not to a page.
basically, you go to the directory, make a link to it on your site, have the file called something obvious, like mine, and then they click on it. after they select the files or whatever to upload and click the submit button, the files are uploaded and they wind up back at the directory.
As for viewing files, it works just like browsing a directory. thus providing you an area they can view but not delete, and also can upload to the area. BINGO a read only area that can be written to by any browser out there, no FTP needed. additionally, you could password protect it with an .htaccess file if you wanted.
OK . . . the script approach to uploads . . . I though you had some other trick going based on your response above. In fact my first post in this thread gave an example script.
Yes . . . you can use the index page for downloads, or have a script read the directory and do a display of links if you want it a little fancier . . . either works.
Thanks for posting back. That is what this board is for (in my view) - learning and helping others :)
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.