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.
My user can get to the relevant files in SSH but in FTP he starts with .bashrc etc (attached) and I can't start seem to move out of this directory in filezilla.
Can I change the directory in which the user begins an FTP session - or any other suggestions please?
ssh (port 22) and ftp (ports 20,21) are separate tools.
If you want to get into your home dir and copy files, use scp or sftp; both are part of the ssh tool.
A good GUI client tool (free) is Filezilla which can do regular ftp or sftp.
A good GUI client tool (free) is Filezilla which can do regular ftp or sftp.
Ok thanks but I am using Filezilla (see screenshot on my previous post). This user works ok in SSH but in Filezilla he seems to be stuck and can't move (screenshot in my first post).
I thinks what chrism01 is meaning is in your hostname, rather than using ftp.domainname.com use sftp.domainname.com instead. This is another method to give a try that i've seen work successfully in some occasions.
Using Filezilla, I've always just (separately) supplied user, passwd, host (or IP) and then specified port 22 in the portnum input box.
It will then use sftp and connect to port 22.
You don't need an sftp.domainname.com entry in your DNS.
I can not provide the answer how to change the directory. But your user is jailed to his/her home directory. In general, you don't want ftp users to snoop around anywhere else in the system.
Can you provide some kind of context as to the why you want the ftp user to get outside his/her home directory? Is it a webserver? Or a dedicated system with one user only?
Last edited by Wim Sturkenboom; 10-31-2012 at 01:09 AM.
Using Filezilla, I've always just (separately) supplied user, passwd, host (or IP) and then specified port 22 in the portnum input box.
It will then use sftp and connect to port 22.
You don't need an sftp.domainname.com entry in your DNS.
OK thanks - I just changed the protocol in filezilla from FTP to STFP (no port) and it works ie I can back up my data.
I can not provide the answer how to change the directory. But your user is jailed to his/her home directory. In general, you don't want ftp users to snoop around anywhere else in the system.
Can you provide some kind of context as to the why you want the ftp user to get outside his/her home directory? Is it a webserver? Or a dedicated system with one user only?
It is a webserver with two websites. I just want FTP users to be able to back up the website data. The website paths are /var/www/vhosts/example.com/httpdocs
Glad it worked for you, if your issue is resolved then could you mark it as solved on the thread tools so other users might benefit from this solution.
Glad it worked for you, if your issue is resolved then could you mark it as solved on the thread tools so other users might benefit from this solution.
Cheers
Steve
Ok done - thanks to SteveThePirate87 and chrism01. Urgent problem fixed = I can now back up my data in filezilla There is still Wim Sturkenboom's point about correct permissions - at the moment I think this SFTP user can go anywhere which is not good but this is not urgent so I can come back to this or find some stuff to read on user permissions...
Multiple roads lead to Rome, I guess. I'm just too lazy to figure all of them out and the one that works for me is to have the websites somewhere in the home-directories of the users. It requires a slight modification of the webserver's configuration to change the document roots.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.