LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-09-2010, 06:48 PM   #1
oznola
Member
 
Registered: Mar 2010
Location: las vegas, nv
Distribution: debian etch, kubuntu, mac osx 10.51, vista
Posts: 65

Rep: Reputation: 15
Question can i change default ftp session directory?


hi,

i have created a wordpress user with a symbolic link from his home (/home/wordpress) to /usr/share/wordpress but when wordpress ftps to wordpress home dir it does not follow the sym-link. is there a way to set default ftp dir for the wordpress user to /usr/share/wordpress rather than /home/wordpress?

thank you.

Last edited by oznola; 04-09-2010 at 06:49 PM.
 
Old 04-10-2010, 02:22 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,477

Rep: Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758
Hi,

To change the user's homedir, run:
Code:
usermod -d /usr/share/wordpress wordpress
Then check the permissions to make sure the user has read/write access on that dir.

Regards
 
1 members found this post helpful.
Old 04-10-2010, 02:55 AM   #3
oznola
Member
 
Registered: Mar 2010
Location: las vegas, nv
Distribution: debian etch, kubuntu, mac osx 10.51, vista
Posts: 65

Original Poster
Rep: Reputation: 15
hi,

ty for the answer to change the users home dir. that works when i ssh but not when i ftp.

when i ftp i am in /home but it says /.

Code:
af@gaga:~$ ftp bubba
Connected to bubba.localdomain.
220 ProFTPD 1.3.0 Server (Bubba) [::ffff:192.168.10.1]
Name (bubba:af): wordpress
331 Password required for wordpress.
Password:
230 User wordpress logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
200 PORT command successful
150 Opening ASCII mode data connection for file list
drwxr-xr-x   9 admin    users        4096 Apr  7 23:31 admin
drwxr-xr-x  12 af       users        4096 Apr  2 20:33 af
drwxr-xr-x   6 cnorland users        4096 Mar 22 05:54 cnorland
drwx------   2 root     root        16384 Jan 16  2009 lost+found
drwxrwxrwx  10 root     users        4096 Feb 12 10:32 storage
drwxr-xr-x   4 thomas   users        4096 Feb 26 19:24 thomas
drwxrwxr-x   2 admin    users        4096 Apr  7 01:25 web
drwxr-xr-x   4 wordpress users        4096 Apr  9 23:20 wordpress
226 Transfer complete.
ftp> pwd
257 "/" is current directory.
ftp> quit
can anyone advise?

thank you.
 
Old 04-10-2010, 04:04 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,477

Rep: Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758Reputation: 1758
The homedir should be the same regardless if you're using ftp or ssh.
What ftp server are you using (vsftpd, proftptd etc)? Maybe you have to check its configuration to see how you define homedirs, or just restart ftp server.

Regards

Last edited by bathory; 04-10-2010 at 05:41 AM.
 
Old 04-10-2010, 05:11 AM   #5
nonamenobody
Member
 
Registered: Oct 2002
Posts: 138

Rep: Reputation: 22
Quote:
when i ftp i am in /home but it says /
Take a look at your proftpd.conf, in particular the DefaultRoot directive. It looks like yours might be set to '/home', you probably want to set it to '~'.

BTW I find it very difficult to comment on an FTP thread, without saying:- FTP is an insecure tool for anything other anonymous FTP and that if you can't use something else (e.g. SFTP/SCP) then you should consider using virtual users (with different passwords to their corresponding user accounts (and perhaps different usernames)).
 
1 members found this post helpful.
Old 04-10-2010, 06:19 PM   #6
oznola
Member
 
Registered: Mar 2010
Location: las vegas, nv
Distribution: debian etch, kubuntu, mac osx 10.51, vista
Posts: 65

Original Poster
Rep: Reputation: 15
ty nonamenobody,

DefaultRoot directive was indeed set to /home. i have changed to the magic character "~" as advised.

how do i reload proftpd.conf?

also, i have the option of "FTPS (SSL)" in wordpress but when i try to use this method to login for my own user name on the command line of the client i get...

Code:
af@gaga:~$ ftps bubba
No command 'ftps' found, did you mean:
 Command 'ftpd' from package 'krb5-ftpd' (universe)
 Command 'ftpd' from package 'inetutils-ftpd' (universe)
 Command 'ftpd' from package 'muddleftpd' (universe)
 Command 'ftpls' from package 'ftpcopy' (universe)
 Command 'ftp' from package 'ftp-ssl' (universe)
 Command 'ftp' from package 'heimdal-clients' (universe)
 Command 'ftp' from package 'ftp' (main)
 Command 'ftp' from package 'inetutils-ftp' (universe)
 Command 'ftp' from package 'krb5-clients' (universe)
 Command 'ftp' from package 'gftp-text' (universe)
 Command 'ftp' from package 'tnftp' (universe)
ftps: command not found
af@gaga:~$
on the server i get...

Code:
bubba:/etc/proftpd# ftps
bash: ftps: command not found
bubba:/etc/proftpd# ssl
bash: ssl: command not found
bubba:/etc/proftpd#


when i try to install it i get this...

Code:
bubba:/etc/proftpd# apt-get install ftps
Reading package lists... Done
Building dependency tree... Done
E: Couldn't find package ftps
bubba:/etc/proftpd#
it looks like my install options on the ubuntu client would be filezilla or kasablanca. i presume these would be needed on the server too.

is one of these packages preferred over the other in this application? recall i am trying to load plugins and themes for the web app wordpress. and i presume they will be available in the repositories for the debian server too.

i am not sure how to implement the other techniques you suggested. perhaps installing filezilla or kasablanca are preferred to the virtual user method?

thank you again.

ftp is hitting the right dir now. i will try and switch to filezilla.

Last edited by oznola; 04-11-2010 at 05:14 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change GDM`s default session ? witek Fedora 3 11-09-2017 05:17 PM
change default vsftp anonymous accout directory /var/ftp to other directory? hocheetiong Linux - Newbie 2 01-24-2010 06:33 PM
default session change DJOtaku Linux - General 3 05-23-2009 05:55 AM
change default directory for FTP server iinfi Linux - Server 4 01-13-2009 08:52 AM
Change Konsole default Session name zmeda Linux - Newbie 3 08-05-2006 02:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration