PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 25, 2012, 04:54:18 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: [Solved] Default FTP Directory  (Read 331 times)
TruckerJohn
Jr. Member
**
Offline Offline

Posts: 33


« on: January 26, 2012, 08:19:47 AM »

I have set an ftp server in PCLInuxOS and the default directory is my Home directory.  I want to change this.  I want to add a second hard drive and use that as the default directory.  Can this be done and if so how do I do it.

Thanks
Logged
pags
Hero Member
*****
Offline Offline

Posts: 1942


Keep it clean.


« Reply #1 on: January 26, 2012, 10:07:34 AM »

Which FTP server did you install?
proftpd?
pure-ftpd?
vsftpd?

Or, did you install from outside the repos?
Logged
YouCanToo
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4244


Location: Lebanon, OR., USA


WWW
« Reply #2 on: January 26, 2012, 03:39:32 PM »

I have set an ftp server in PCLInuxOS and the default directory is my Home directory.  I want to change this.  I want to add a second hard drive and use that as the default directory.  Can this be done and if so how do I do it.

Thanks

Usually that setting is done in the configuration file of the ftp server. Normally the users are "jailed" within their home directory due to security concerns. For example in pure-ftp you will find some lines like this

Code:
# Cage in every user in his home directory

ChrootEveryone              no

# If the previous option is set to "no", members of the following group
# won't be caged. Others will be. If you don't want chroot()ing anyone,
# just comment out ChrootEveryone and TrustedGID.

 TrustedGID                   500

Normally (default) the ChrootEveryone is set to 'yes' which "jails" everyone to their home directory. By changing it to no and using the TrustedGID, that user may than go to any directory. He than may also write to that directory provided he has the needed permissions.

In vsftp.conf you need to look for this

Code:
passwd_chroot_enable
    If enabled, along with chroot_local_user , then a chroot() jail location may be specified on a per-user basis. Each user's jail is derived from their home directory string in /etc/passwd. The occurrence of /./ in the home directory string denotes that the jail is at that particular location in the path.

    Default: NO

chroot_local_user
    If set to YES, local users will be (by default) placed in a chroot() jail in their home directory after login. Warning: This option has security implications, especially if the users have upload permission, or shell access. Only enable if you know what you are doing. Note that these security implications are not vsftpd specific. They apply to all FTP daemons which offer to put local users in chroot() jails.

    Default: NO


But as pags posted if you want more specific help you really need to tell us which FTP Server you have running.
Logged





Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!
TruckerJohn
Jr. Member
**
Offline Offline

Posts: 33


« Reply #3 on: January 27, 2012, 07:01:23 AM »

I used the PCLinuxOS control centre to configure an ftp server so I am not sure which I am running.  From Synaptic I can see proftpd is installed.
Logged
pags
Hero Member
*****
Offline Offline

Posts: 1942


Keep it clean.


« Reply #4 on: January 27, 2012, 08:55:43 AM »

OK.
Code:
man proftpd
should get you information about the program.  It is also here.

Specifically, you can use the
Code:
-t,--configtest
to check any modifications you make to the configuration, and
Code:
-c,--config
will let you speficy an alternate config file.

For information about the configuration file, look here.

I'm not running it, myself, at the moment, so I can;t comment off of the top of my head, but I think this is important:
Quote
The full documentation for proftpd.conf is maintained as a HTML file in the package proftpd-doc ; if for example the lynx and proftpd-doc packages are properly installed at your site, the command
lynx /usr/share/doc/proftpd-doc/Configuration.html

 should give you access to the complete manual.

Logged
YouCanToo
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4244


Location: Lebanon, OR., USA


WWW
« Reply #5 on: January 27, 2012, 03:01:50 PM »

in the proftpd.conf file look for the following line

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

To comment this line out change it to

# DefaultRoot ~

Once you have made and saved your changes, the ftp server needs to be restarted. In a console window as the root user enter

service proftpd restart    <press enter>
Logged





Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!
YouCanToo
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4244


Location: Lebanon, OR., USA


WWW
« Reply #6 on: January 27, 2012, 03:40:59 PM »

Another thought did you tell your client program which initial directories to start with? What software are you using to connect to your ftp server?
Logged





Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!
TruckerJohn
Jr. Member
**
Offline Offline

Posts: 33


« Reply #7 on: January 30, 2012, 05:25:07 AM »

Thanks for the replies.  I will play with the config file and see what I can do.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM