define $basedir only when managing users to prevent duplicate resources