Solved

Changing FTP Root Directory in proftpd.conf

Posted on 2009-04-11
16
4,366 Views
Last Modified: 2013-11-29
I recently deployed an FTP server using FreeBSD and FreeNAS.  Currently, if an anonymous user posts a file, it goes to the /mnt directory.  How can I make it so that by default all ftp files go to another directory like /mnt/array1/ftp?

Thanks in advance
0
Comment
Question by:ged125
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 7
16 Comments
 
LVL 3

Expert Comment

by:dobbshelp
ID: 24124239
Here is a pretty good site that describes the proftpd.conf file: http://linux-sxs.org/internet_serving/proftpd.html

You want to look at the section on:
<Anonymous /home/ftpdown>
    <Limit LOGIN>  
     AllowAll
    </Limit>
0
 
LVL 6

Author Comment

by:ged125
ID: 24124250
I am using FreeNAS, do you know where the proftpd.conf is located?  All I have is an option to add to the file from the Gui.
0
 
LVL 3

Expert Comment

by:dobbshelp
ID: 24124256
I believe it's located @ /var/etc/proftpd.conf
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 6

Author Comment

by:ged125
ID: 24124260
ok, we are almost there.  I have added the config I want.  Now how do I restart the service?  :)
0
 
LVL 3

Expert Comment

by:dobbshelp
ID: 24124269
Try;

cd /etc/rc.d/
proftpd.sh restart

or

proftpd.sh stop
proftps.sh start
0
 
LVL 3

Expert Comment

by:dobbshelp
ID: 24124272
Or through the WebGUI in FreeNAS ;)
0
 
LVL 6

Author Comment

by:ged125
ID: 24124276
Well... it is going to the directory that I want now, but anonymous users don't have access to write.  Ugh!  I am already going to give you the points, but if you know how I could add the permissions, please help.

Thanks again.
0
 
LVL 3

Accepted Solution

by:
dobbshelp earned 500 total points
ID: 24124280
Here is an anonymous sample proftpd.conf that you have some dirs read only, an uploads dir writable, and some other samples.

http://www.proftpd.org/docs/configs/anonymous.conf
0
 
LVL 6

Author Closing Comment

by:ged125
ID: 31569252
You're the best, thank you!
0
 
LVL 3

Expert Comment

by:dobbshelp
ID: 24124297
Thank you and good computing to you ;)
0
 
LVL 6

Author Comment

by:ged125
ID: 24124302
One last thing....

any idea why this isn't allowing access?  Wouldn't that allow write?

<Anonymous /mnt/Array1/TFTP>
  User ftp
  Group ftp
  UserAlias anonymous ftp
<Limit WRITE>
  AllowAll
</Limit>
</Anonymous>
0
 
LVL 3

Expert Comment

by:dobbshelp
ID: 24124311
Try this, it should allow read and write (without being able to test it on my side anyways):



<Anonymous /mnt/Array1/TFTP>
  User ftp
  Group ftp
  UserAlias anonymous ftp

    <Limit READ>
      AllowAll
    </Limit>

    <Limit STOR>
      AllowAll
    </Limit>
  </Directory>
</Anonymous>
0
 
LVL 6

Author Comment

by:ged125
ID: 24124319
Getting a permission denied error.  Is is possible there are file permissions in addition to FTP?  Sorry to grap you back into this.  I can open a new question if you want.
0
 
LVL 3

Expert Comment

by:dobbshelp
ID: 24124332
No worries ... I believe your upload dir needs to be owned
by the ftp group. It's been awhile since my last proftpd install. Changing owner is usually done by:

chown -R username somedirchown

Open in new window

0
 
LVL 6

Author Comment

by:ged125
ID: 24124345
That did it!!!  You are awesome!  Have a great weekend.
0
 
LVL 3

Expert Comment

by:dobbshelp
ID: 24124349
Thank you and enjoy your weekend also!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question