Copy files and folders to the /CECI/proj partition¶
Introduction¶
In Linux, the users has a user identifier uid
, a group identifier gid
and a
list of other groups to which the user is a member. In the CÉCI clusters the
uid
and gid
are equal to your login account.
user@cluster:~$ id
uid=NNNNNN(user) gid=NNNNNN(user) groups=NNNNNN(user),JJJJJ(ceci_group),KKKKK(group2), ...
The files and folders have a user owner and a group owner. When you create or
copy files, they get your uid
and gid
user@cluster:~$ mkdir test
user@cluster:~$ touch test/file{1..3}
user@cluster:~$ ls -l test/file*
-rw-rw-r-- 1 user user 0 May 28 10:02 test/file1
-rw-rw-r-- 1 user user 0 May 28 10:02 test/file2
-rw-rw-r-- 1 user user 0 May 28 10:02 test/file3
CÉCI users can be part of a project which share files in a group folder inside
/CECI/proj partition. All the files and folders inside the
/CECI/proj/ceci_group
folder must have the group name equal to
the name of CÉCI group you belong instead of the name of the user.
Copying from a cluster front-end to /CECI/proj¶
If you want to copy files from your HOME, the
GLOBALSCRATCH or other cluster location to the directory of your group inside proj
partition you first need to change your gid
with newgrp
command, copy
your data and exit
to restore your gid
.
user@cluster:~$ newgrp ceci_group
user@cluster:~$ id
uid=NNNNNN(user) gid=JJJJJ(ceci_group) groups=NNNNNN(user),JJJJJ(ceci_group),KKKKK(group2), ...
user@cluster:~$ cp -r folder /CECI/prog/ceci_group/path/.
user@cluster:~$ exit
Replace ceci_group
with the name of the CÉCI group you belong.
Copying from a your computer to /CECI/proj¶
To copy the data form your Linux or MacOS computer you must add to your rsync command the -og
and
--chown=user:ceci_group
flags. For example, to copy a local folder inside
/CECI/proj/ceci_group/path/
folder using one of the clusters front-end, you can use the command:
local_user@mycomputer:~$ rsync -azv -og --chown=user:ceci_group local/folder cluster:/CECI/proj/ceci_group/path/.
Where cluster
is one of the host defined in your ssh configuration file, user
is your CÉCI user identifier
and ceci_group
is the name of the CÉCI group you belong.
Note
If the rsync version in MacOS is to old (< v3.1.0) and --chown
option
is not available, the newer version must be installed, for instance with
Homebrew.