[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4482
  • Last Modified:

Changing FTP Root Directory in proftpd.conf

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
ged125
Asked:
ged125
  • 9
  • 7
1 Solution
 
dobbshelpCommented:
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
 
ged125Author Commented:
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
 
dobbshelpCommented:
I believe it's located @ /var/etc/proftpd.conf
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ged125Author Commented:
ok, we are almost there.  I have added the config I want.  Now how do I restart the service?  :)
0
 
dobbshelpCommented:
Try;

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

or

proftpd.sh stop
proftps.sh start
0
 
dobbshelpCommented:
Or through the WebGUI in FreeNAS ;)
0
 
ged125Author Commented:
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
 
dobbshelpCommented:
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
 
ged125Author Commented:
You're the best, thank you!
0
 
dobbshelpCommented:
Thank you and good computing to you ;)
0
 
ged125Author Commented:
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
 
dobbshelpCommented:
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
 
ged125Author Commented:
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
 
dobbshelpCommented:
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
 
ged125Author Commented:
That did it!!!  You are awesome!  Have a great weekend.
0
 
dobbshelpCommented:
Thank you and enjoy your weekend also!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

  • 9
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now