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. |
In your FTP script why not put the users into the backup drive by default?
|
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 !! :( |
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. |
Hi,
Thanks. I will try this today evening and let you whether it works or not. bye Manish |
All times are GMT -5. The time now is 11:55 PM. |