How do I use my .htaccess file to restrict access to my FTP?  (see details)?
551466
hi, .htaccess is not ONLY allowing restriction to directories. htaccess is used to OVERRIDE the webserver (apache) configuration on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.\n\nSo back to your question, htaccess is for your http://www.myexamplesite.com/  to put unique configuration to certain directories. \nTo protect ftp://www.myexamplesite.com/ you would need to disable Anonymous user or add a password for them.\n\nIf your on shared hosting, take a look at their control panel and they would have a place to add a password for anonymous or disable anonymous. If you care to use that for your self you can access the ftp by doing this:\nftp://[ USER ]:[ PASSWORD ]@[ DOMAIN ]:[ PORT ]\nwhere:\n[ USER ] = Username to the ftp\n[ PASS ] = Password for that username\n[ DOMAIN ] = The host or IP , in your case it is myexamplesite.com\n[ PORT ] = Whatever port you assigned, in your case it is by default which is 21. \n\nIf you have an option to change your PORT, please change it to a 4-5 digit number not exceeding the maximum 35K. That will increase security slightly.\n\n\nHope I helped
832034
Usually the web hosting service provider will give you access to your main control panel (e.g. Cpanel). Changing the FTP password and a lot more features are available from there. You may be able to log on to it from the host's website.
818519
Here is one way to do it... although I prefer to do the uploads on my site with the php FTP functions (shown below).\n\n$uploaddir = '/var/www/uploads/';\n$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);\n\nif (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {\n   echo "File is valid, and was successfully uploaded.&#92;n";\n\n\n----------------------------------------------------------------------------------------------------\nFTP--\n\n<?php\n// set up basic connection\n$conn_id = ftp_connect($ftp_server); \n\n// login with username and password\n$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); \n\n// check connection\nif ((!$conn_id) || (!$login_result)) { \n       echo "FTP connection has failed!";\n       echo "Attempted to connect to $ftp_server for user $ftp_user_name"; \n       exit; \n   } else {\n       echo "Connected to $ftp_server, for user $ftp_user_name";\n   }\n\n// upload the file\n$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY); \n\n// check upload status\nif (!$upload) { \n       echo "FTP upload has failed!";\n   } else {\n       echo "Uploaded $source_file to $ftp_server as $destination_file";\n   }\n\n// close the FTP stream \nftp_close($conn_id); \n?>\n} else {\n   echo "File upload failed!&#92;n";\n}
47686
Why FTP? Can it be http?  If so, i have a link to a site that has lots of free downloads.
356870
All you need to do pick FTP server and install it on one of your machines. All of this ftp server are easy to setup. If you want to access to your ftp server anywere on the internet you need to open port 21 on your router. ****Be carefully open port on your router can expose you to virus.\n\n\nIIS-http://www.webwizguide.com/asp/tutorials/installing_iis_winXP_pro.asp\nApacheFTP-http://incubator.apache.org/ftpserver/\nhttp://filezilla.sourceforge.net/
654350
the command is call "chmod"\n\nworks from a shell or from ftp\n\nthe basic command is\n\nchmod ugo+rwx FILENAME\n\nif you want to change\nu user permissions\ng group permissions\no other permissions\n+ adds\nr read  access\nw write access\nx execute (or accessibility for a directory)\n\na webserver does not run as you, so you need to give it read access. if you are a member of its group you add the group permission, but it's probably "other"\n\nas an alternative you can set permissions as an octal numer\n\nchmod 644 FILENAME\nwould give you full permission, and your group and others read only\n(chmod 755 DIRNAME for a directory)\n\nI've used ws_ftp before, and it's pretty nice so it probably has this feature... but I have my limits and I don't think I'm going to install it just to test it for you :) try using a female avatar, that suckers me sometimes :)\n\nbut, to fix your immediate problem, you can log in using the regular windows ftp and set it that way\n\nin an MSDOS window type\nftp HOSTNAME\n\nuser: yourusername\npassword: yourpassword\n\nthen, once you are logged in you will be in your login directory. if you want to see the directory listing\n\nls\ndir\n\n(either of those will work) if you need to change directories\n\ncd DIR/NAMES\n\nthen \n\nchmod 644 FILENAME\n\nyou can use wildcards, but you need to turn on "globbing" usually which I can't recall how to do\n\nglobbing on\nglob on\nset glob on\nhelp\n\ntype some combination of the above, or search the web for ftp globbing and you will find how to do it.\n\nThe other thing you can do probably is add a file to you home directory and put a umask in it. then, when you log in it will set your default permissions to the umask. check with your ISP help for whether they support this and what file you should put it in or whether they will change it for you. Once you've identified where it goes, the other tricky part is that umasks are the binary opposite of chmod bitfields, so the umask number is not the same as the 644. I always have to look it up so that's what you'll have to do, but now that you know it's called a umask, searching will be pretty easy.
661365
Before you continue to set up an ftp server on your computer you will need to get a static IP address.\nwithout it your users will no be able to access your server.
206856
http://www.xthost.info/ has free webhosting.  You can upload your files directly with ftp.  The only bad thing is that your website is deleted if you don't access it once a week.
672077
If you're running *nix, then you need to suss out users and permissions. CGI scripts run as a user (by default, as whatever user the web server is running as, but you can change this in httpd.conf). To restrict access to files, you need to restrict access for that user. Find any Unix tutorial, and it'll explain this more fully.
337710
just modify your webpage which ever u want to and replace it in u'r FTP or what ever so is your web site accessed through
610551
1. You can write the code in your .HTACCESS file. Here are some good tutorials on how to do password protection with HTACCESS file \n\nhttp://www.javascriptkit.com/howto/htaccess3.shtml\nhttp://www.htmlite.com/HTA006.php\nhttp://www.ssi-developer.net/htaccess/htaccess_protection_simple.shtml\n\n2. An easier way would be to use automatic tools such as Dynamic Drive's  http://www.tools.dynamicdrive.com/password/ http://tools.dynamicdrive.com/password/\n\n3. Check with your web host if they have a password protection utility offered in your Site Control. Some hosting companies have this tool
184657
There are a few ways, I wish you had put a certain web site or a certain type of firewall. The best I can give you is but safe143 at the end of the url or put home. instead of www.
266604
Using the wrong address, FTP must be used correctly, you missed the point somewhere. Check if you can find your file to down load it for a change. If not, it didn't upload.\n\nI have been useing thier page builder for years, it's much easier than  codes.
865949
If the site is yours, and you have access to the FTP account, simply dowloaded all files to a folder and burn it from them,
616519
FTP uses port 21. Make sure you have port 21 access.
767262
are you hosting your website on your own server ??\n\nif yes than go to IIS, click on ur website, open the directory or folder what you want to block for anonymous, \n\nright click on that folder, select permission, and give password to that folder.\n\nnow if anybody wants to access that page it will ask password to open it..\n\ni hope it can help u.\n\nlet me know if you have any further question
5119
You will need to setup mod_rewrite in apache. it's pretty easy, i've linked to the mod_rewrite website, and a really nice mod_rewrite cheat sheet for figuring out what you need to put in your .htaccess file\n\ngood luck!