| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-23-2010, 03:40 AM
|
#1
|
|
LQ Newbie
Registered: Apr 2010
Posts: 3
Rep:
|
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..
|
|
|
|
04-23-2010, 07:59 PM
|
#2
|
|
Senior Member
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291
Rep:
|
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!
|
|
|
|
04-24-2010, 09:25 AM
|
#3
|
|
LQ Newbie
Registered: Apr 2010
Posts: 3
Original Poster
Rep:
|
Quote:
Originally Posted by Tuttle
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..
|
|
|
|
04-24-2010, 09:39 AM
|
#4
|
|
Senior Member
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291
Rep:
|
then mount it anywhere you like and set the root directory using proftpd.conf
|
|
|
|
04-26-2010, 02:06 PM
|
#5
|
|
LQ Newbie
Registered: Apr 2010
Posts: 3
Original Poster
Rep:
|
Quote:
Originally Posted by Tuttle
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..
|
|
|
|
04-30-2010, 02:45 AM
|
#6
|
|
Senior Member
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291
Rep:
|
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:
Last edited by Tuttle; 04-30-2010 at 02:49 AM.
|
|
|
|
04-30-2010, 02:52 AM
|
#7
|
|
Senior Member
Registered: Jul 2003
Location: Wellington, NZ
Distribution: mainly slackware
Posts: 1,291
Rep:
|
another trick is to discover the UUID of the usb drive (hint: hdparm) and use that in fstab instead of /dev/sdc1...
|
|
|
|
All times are GMT -5. The time now is 05:07 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|