Using catalog-chown

When using cvmfs_server catalog-chown do I need both a uid map file and a gid map file? I only need to change the UID but both options are listed in <> in the help dialog, which implies that both are needed.


I really want to make sure this is done correctly. Can I use an empty gid map file?

Currently the gid map file can neither be omitted or empty, but you should be able to put in a trivial mapping like

# map 9999 to 9999
9999 9999

that should also leave all other gids as they are.

Thank you. I have a related question; how do I change the owner of the repository itself, ie., the spool and srv directories?

This can be done with chown, but is not a straightforward operation. The safest route to avoid data loss is probably to move the repository to a backup location, create a new repository and import it, and probably it should be tried on a test repository beforehand. Can you give a bit more context why you need to change this user, so we can think about tooling to help this?

The context is that the repositories were owned by my login user. I wanted to change that to a “special” user instead.

I will add that I did get it working, but probably not in an ideal way. In addition to chown for the srv and spool directories, the owner of the key in /etc/cvmfs/keys also needs to be changed. The CVMFS_USER also needs to be set in the respective repository server.conf file.

Ok, great that you managed to find all the places to make the modifications. We’ll think about adding a tool to make this smoother in the future.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.