LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-09-2009, 06:35 PM   #1
manish_jain
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Rep: Reputation: 0
FTP server to upload files on an external HDD


Hello,

I have set up a linux ftp server (vsftpd) with local_enable=YES and chroot_local_user=YES.

Also attached to the server is a 1TB backup drive, and all users have a backUpFolder on that drive.
Besides, all users have in their home directory: $$ ln -s /media/[BackUPDriveMnt]/[BackUpFolderForUser] myBackupFolder.

The intention is for the users to be able to specifically upload files to this backup drive. However, ftp disallows users to cd into this myBackupFolder.
scp into the folder works fine. ftp uploads to other local directories of the users also works.

One thing that I have observed is that these backup folders are owned by root/root with 777 permissions, but that is not surprising as external hdd's are mounted by root.

Can you tell me what is missing?

Thanks.
 
Old 07-09-2009, 09:25 PM   #2
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 653

Rep: Reputation: 53
In your FTP script why not put the users into the backup drive by default?
 
Old 07-09-2009, 09:55 PM   #3
manish_jain
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Original Poster
Rep: Reputation: 0
The idea was that users can access their personal accounts as well as the backup drive. If I put them in the backup drive by default, will they be still able to access their home directories?

btw, which trying mount --bind, I somehow screwed up my 1TB drive. It shows all the files present when I mount it, but
fdisk -l says 10MB, 100% usage and fsck says

fsck 1.41.3 (12-Oct-2008)
fsck.ext2: Bad magic number in super-block while trying to open /dev/sdb
/dev/sdb:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>


Man I am so stuck !!
 
Old 07-10-2009, 10:09 AM   #4
suhas!
Member
 
Registered: Mar 2007
Posts: 100

Rep: Reputation: 17
Hello,

Instead of creating a symlink to external drive in every user's home directory, you can just remount the same external drive under every user's home directory

# mount --make-shared /media/[BackUPDriveMnt] /home/user1/[BackUPDriveMnt]

Above command will allow you to have multiple mount point to the same drive, and ftp will also allow access to that drive.

If you have permissions properly set for /media/[BackUPDriveMnt]/[BackUpFolderForUser] , it should serve your need.

Regards.
 
Old 07-10-2009, 11:04 AM   #5
manish_jain
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi,

Thanks. I will try this today evening and let you whether it works or not.

bye
Manish
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
FTP Server -- Hiding files after upload dnoy Linux - Newbie 3 05-05-2009 06:41 PM
C++: how to upload files using ftp matiasar Programming 3 02-25-2009 06:01 AM
upload files on ftp zafar466 Programming 2 12-14-2006 08:16 AM
Upload files to newly setup server via FTP Madone_SL_5.5 Linux - Newbie 4 10-27-2006 07:59 PM
Connection, login and upload files to ftp server via shell script Paulo Ges Linux - Networking 2 02-21-2004 02:01 PM

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

All times are GMT -5. The time now is 10:49 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration