LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Register
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-23-2010, 03:40 AM   #1
Jeso
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Rep: Reputation: 0
Proftpd, USB external HDD, ubuntu 10.04


Hi.
Situation:
Proftpd server installed and running
External USB drive connected only sometimes with FTP folder on it, filesystem is NTFS

And what do I need? I need the FTP folder from the external USB HDD to be mounted (--bind?) to the ftp home directory whenever the disk is connected, and to be accessible via the ftp connection for reading.. Can anyone help me please?

System: Ubuntu 10.04 beta, Gnome
HDD: /dev/sdc1 WD640Gb

Thank you for any answer..
 
Old 04-23-2010, 07:59 PM   #2
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
The easiest way I know is to mount your usb drive at /home/ftp then restart proftpd, don't try to automate this process, it's not worth the effort!
 
Old 04-24-2010, 09:25 AM   #3
Jeso
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by Tuttle View Post
The easiest way I know is to mount your usb drive at /home/ftp then restart proftpd, don't try to automate this process, it's not worth the effort!
1) User FTP does not have the rights to access the drive since it has been mounted by logged on user (not the FTP one)

2) This could be solved by adding umask=000 to the fstab line, but i can't add there this line because it is ntfs drive and there is problem with fuse

3) I need to mount just one directory from the drive (ftp folder), the drive contains other data i don't wanna share..
 
Old 04-24-2010, 09:39 AM   #4
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
then mount it anywhere you like and set the root directory using proftpd.conf
 
Old 04-26-2010, 02:06 PM   #5
Jeso
LQ Newbie
 
Registered: Apr 2010
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tuttle View Post
then mount it anywhere you like and set the root directory using proftpd.conf
But there is the problem.. When i connect the drive, it is mounted by current user. But the ftp user is different (!), so the ftp user does not have rights to access it. Only thing i need is to set privileges for the usb drive. How do i do it?

Thanks for help..
 
Old 04-30-2010, 02:45 AM   #6
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
Sorry for the delay, been terribly busy...

Add this to your /etc/fstab file:

Code:
/dev/sdc1    /home/ftp    auto    noauto,uid=ftp,umask=022    0   0
edit: it won't mount automatically but once the usb drive is plugged in (and provided it's /dev/sdc - hint: type dmesg just after plugging it in) you can then mount it as root by typing:
Code:
mount /home/ftp

Last edited by Tuttle; 04-30-2010 at 02:49 AM.
 
Old 04-30-2010, 02:52 AM   #7
Tuttle
Senior Member
 
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291

Rep: Reputation: 52
another trick is to discover the UUID of the usb drive (hint: hdparm) and use that in fstab instead of /dev/sdc1...
 
  


Reply



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
I installed ubuntu 9.04 to my Maxtor external hdd. I have no internal hdd. I can boot dont33 Linux - Newbie 1 08-13-2009 04:13 PM
External ubuntu install on external USB HDD th3_tr00p3r Linux - Newbie 1 05-11-2008 02:56 PM
Installing Ubuntu on External HDD; PC has no internal HDD 449 Ubuntu 2 11-28-2007 05:12 PM
ubuntu not recognizing external usb hdd tripled2006 Ubuntu 2 01-15-2007 11:49 AM
manual mount - external usb hdd (ubuntu) tripled2006 Linux - General 1 01-15-2007 10:08 AM

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

All times are GMT -5. The time now is 05:07 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
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