How-To Sketch

AWS EC2: Mounting a separate set of S3 disks for each Windows user

Ann Lynnworth Dec 2017

article image

CloudBerry Labs CloudDrive licensed on a Windows server might seem expensive, but it depends on how large the disks are that you need, how frequently you need to access the files, how large the files are, and how complex the privacy/security issues are between users.

This idea might help someone who is trying to share an AWS EC2 machine with a friend or two in other time zones.

The easy alternative is to spend the money and mount AWS volumes, but if you have ruled that out, CloudBerry Drive is an interesting fixed-price option as long as you do not require Windows case-insensitive file names.

However, as of now (December 2017), there is no way to use the CloudDrive GUI to have separate drives mounted for separate users, and hidden for the other users. Right now, as each user logs in using Remote Desktop, yes they get their own Desktop, but they can see all CloudDrive network disks that have been mounted.

One way around this is to use the command line to mount the drives from a BAT file that runs automatically upon login, AND to have people get off the remote desktop session by running a complementary BAT that unmounts and then runs logoff.exe.

Details follow. This example assumes that you have installed CloudBerry CloudDrive in the mode for each individual user , and then used the tray-icon GUI to set the Options under each user account.

The place where all this is happening is on an Amazon EC2 machine running Windows Server 2016.


Mount S3 Drives


CD /D "C:\Program Files\CloudBerryLab\CloudBerry Drive"
if errorlevel 1 pause
:: Hmm. This startservice syntax must run-as admin, so not helpful here.  Instead keep the CloudDrive service on Automatic start.
:: cbd.exe /startservice
cbd.exe mountDrive P
REM if errorlevel 1 .... do something
:: etc for more drive letters
start CloudBerryDriveTray.exe

Graceful Sign Off


CD /D "C:\Program Files\CloudBerryLab\CloudBerry Drive"
if errorlevel 1 pause

cbd.exe unmountDrive P

:: this next line will close the remote desktop session
logoff

To make the first BAT run automatically, run taskschd.msc and trigger it from LOGON.

Photo from msp360.com

Article Keywords:

Company publishing this blog in 2022: HREF Tools Corp. based in Wilmington, Delaware USA Privacy