Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Set up my very first Linux box today with Slackware 10.1. With a lot of reading I got PHP and MySQL running.
With a cross-over network cable I connected my XP machine to the Linux box to explore web-hosting, etc. I created a user with the following command: adduser mark, then it prompts: UID ... Initial Group, Additional Groups, Home Directory, Shell, Exp date, etc.
When I use Filezilla to upload websites to the /var/www/htdocs directory it gives a "Critical transfer error" and does not upload the files. This is probably a permission error but how can I ftp as mark to upload files and create directories in the htdocs directory on the server, oh and the cgi-bin directory? My goal is to learn oscommerce and commerce-cgi with this box; doing it "local' is faster and cheaper!
I'm not familiar with the error you listed, but it does sound like a permissions problem. Each directory/file in *nix has permissions attached to it, and user mark doesn't have permission to create files in /var/www/html. The easiest solution (that is also safe) is to ftp the files into /home/mark/, and then use sudo or su to move the files into /var/www/html. You could also change the permissions on /var/www/html/, but that would make a real world webserver unsecure. As you plan to use this to learn, it is best to use the box as a real world server would be, and allowing easy access to the web directory is not the best of ideas. That will make it a 2 step process, the ftp step, then use putty or whatever your ssh client is to move the files. Many web developers like a program called SCP or something like that, which is just a port of the *nix scp (secure copy) program for Window$.
You could also change the permissions to allow mark to write to the directory, or ftp as root, but I don't think most ftp servers will allow root to log in. The ftp server I use, vsftp doesn't allow that at all, unless you modify the .conf file.
Jim thanks for the reply! I did a chmod 777 on the htdocs directory and now I can upload files to my "www.mynamewebsite.com" directory, without Filezilla giving any errors. The website display in my browser as well. I understand that this is absolutely not secure, but I don't know what the command is to move files from the home dir to the htdocs dir in Linux? I am using putty to log into the server from my Windows PC.
I also tried the " Ln -s /home/MYNAME /var/www/htdocs " command to link the http dir to my user account to transfer files from there - uploading didn't work.
As you said, it is not possible to log in as root via an FTP client, unless changes are made...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.