3

I am trying to find out the best way to set up a shared drive for a company which has 50+ users in 3 office locations in different cities.

They basically need a drive with a common folder to store company documents (eg. /home/company-docs/) plus a personal folder for each user (eg. /home/username/mydocs/). They will mainly access the drive from Windows 7 machines and few Ubuntu machines.

They cannot use an external application such as Dropbox, Google Drive and so on (for regulatory and compliance reasons).

I am currently using Ubuntu server 14.04 with ProFTPD, and the machines access the server drive using WinSCP or Filezilla. For permissions I am using ACL.

The tricky part is the folder structure so everyone can see the common folder (/home/company-docs) and the personal folder (/home/username/mydocs) in their home directory.

Using ProFTPD I can chroot jail the users to their home directory and there mydocs/ folder is created (using skel).

But how can I give them access to the company folder which is located outside their home folder (path is /home/company-docs)???

My first option is to mount /home/company-docs/ in the user home:

mount --bind /home/company-docs/ /home/user_name/company-docs

And then make this configuration permanent by editing /etc/fstab:

/var/www/dev  /home/user_name/www_dev    none    bind    0       0

But the above solution works for just 1 particular user, how can I make this work for every user in the system and make it permanent for every user? and also how to set it up automatically when a new user is created?

Please let me know if you have any idea on how to accomplish this or any other better way you may think on doing it.

1

Don't use FTP: not only is it insecure ( passwords are sent in plain text ), but it is also a pain for users to use. Install samba and use regular windows file sharing. To give users permission to /home/company-docs, use chmod to allow world read and optionally write access:

sudo chmod a+rw /home/company-docs
0

I can't say I know much about ProFTPD, but would it be possible to let each user have two separate server entries: their private as is and a separate that is shared? I.e., all of them "logging on" to the same shared entry, with its own chroot jail?

  • No really, I am looking for one single server for both the private and the shared folders, with 2 servers it will be tricky for users to continuously login into different servers to save data and also it increase twice the maintenance, backup,etc.. of 2 separate servers. But thanks for your answer – berriop Dec 2 '15 at 22:45
0

Keep it simple

Use samba to share the directories, and use groups and permissions to control access.

Since this appears to a regulated environment, check what the regulations, internal auditors, and your management have to say about who should have what access. If those sources say nothing then I recommend

  • All users have read access to all shared directories.

  • Trusted users be added to a docs group, which has write access to the company docs directory. Maybe everyone is a member of this group, but it allows future control choices.

  • The company docs directory should be setup to allow for future changes. I suggest a company directory at the same level as the user directories for easy navigation, then the docs directory below that. This allows future directories inside the company directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.