Tag Archives: ftp

Sharing a Folder among Two FTP users

This might be a very simple article for many people but for some it holds the key for a very good & stable solution.

Scenario:
Two users who want to share a folder and upload data. “User A” and “User B”. They are both restricted to their home directories when they connect with FTP. The folder is actually a shared storage where both the users will upload data. Shared storage is mounted under /Bigdata.

Solution:

Create a Directory in home directory of both the users and call it “OurData”

# cd /home/user-A
# mkdir OurData

Now mount the directory with bind option
#mount –bind OurData/ /BigData/

Make it permanent in fstab

vim /etc/fstab

/BigData /home/user-A/OurData none bind 0 0

Repeat the same for User-B

Make sure the following:
1) Make Both users member of same group , lets call it data
2)Give proper permissions to BigData folderĀ  such as 770
3) Setup acl with setfacl for both users.

Now they can connect with FTP and share the data without any issues.

Thanks,
Salman A. Francis
ITpings.com
www.YouTube/Linuxking
Facebook.com/Linuxking77