Give other users access to your files

If you own a data tag or a data file in the LSF data manager cache, you can change the user group ownership of a tag, and ownership and the permissions of a file. The parameter CACHE_ACCESS_CONTROL=Y must be configured in the lsf.datamanager file to change group access and permissions for files and tags that you own.

Give another user group access to your files

Use the bdata chgrp command to give users in another group accesses to files in the data manager cache. For example, to share a file in the cache that is named hostA:/newshare/scal/user1/data_files/15/seqdata.1 with a group of users in user group ugrp2, use the following command:
bdata chgrp -g ugrp2 hostA:/newshare/scal/user1/data_files/15/seqdata.1

A user in group ugrp2 can submit a data job that uses the file bsub -data "hostA:/newshare/scal/user1/data_files/15/seqdata.1" a.out. You must make sure that the permissions on the original copy of the file are set so that users in group ugrp2 can read it.

Changing the group of a file applies only to files in the data manager cache. If the entry in the cache is a symbolic link, the user group of the file is not changed. The data manager does not modify the original files.

Only the owner of the file can change the group access with the bdata chgrp command.

Share a data tag with another user group

Use the bdata chgrp command to give users in another group accesses to files to share a tag with users in another group. For example, if user user1 wants to change the group permission of the files that are uploaded to a tag named SEQ_DATA_READY so that user user2 in user group ugrp2 can access them, user user1 runs the following command:
bdata chgrp -g ugrp2 -tag SEQ_DATA_READY

When users in user group want ugrp2 to use this tag, they use the command bsub -data tag:user1@SEQ_DATA_READY.

Only the owner of the tag can change the group access with the bdata chgrp command.

Change the permissions on your files

Use the bdata chmod command to change the permission mode of files that are required for a job that are already staged in to the cache. For example, if file hosta:/newshare/scal/user1/data_files/15/seqdata.1 was staged in with the data group specified as group ugrp2, the following command explicitly makes a file group readable by that group:
bdata chmod -mode 440 hosta:/newshare/scal/user1/data_files/15/seqdata.1

A user who belongs to group ugrp2 can access the file.

The file must be in the transferred or idle state for the chmod command to succeed.

Only the owner of the file can change the permissions with the bdata chmod command.

View group permissions on cached files and tags

Use the bdata cache -l command to see the user group and the permissions for a file in the cache.
bdata cache -l 1152
Job <1152@dm1> has the following file records in LSF data manager:
--------------------------------------------------------------------------------
INPUT:
hostA:/newshare/scal/user1/data_files/15/seqdata.1
PERMISSION          group:pcl   rwxr-x---   [manual]
HASH                b7202f200c0240a66493f81f0e2e8875
SIZE                1 KB
STATUS              TRANSFERRED
XFER_JOB            1153@dm1 FINISHED Tue Nov 17 10:42:25 2015
GRACE               -
MODIFIED            Tue Apr 19 15:59:28 2015 

CACHE_LOCATION:
/data/cluster1cache/stgin/user/user1/hostA/home/user1/testDATA/seqdata.1/b7202f200c0240a66493f81f0e2e8875
Use the bdata tags list command to see the user and group that a data tag belongs to.
bdata tags list
NAME      USER    GROUP     LAST_UPLOAD          LAST_DOWNLOAD
code      user1   pcl       06/12/2015 15:50:10  -
tag1      user1   <error>   03/12/2015 13:51:59  -
tag2      user2   test      03/12/2015 13:52:06  -
tag3      user2   test      03/12/2015 13:52:09  -

If a bdata chgrp command did not successfully change the user group of the file, the GROUP column shows <error>.