diff --git a/smartgears/r_connector/templates/rusersadd.j2 b/smartgears/r_connector/templates/rusersadd.j2 index c2f1e453..009b716b 100755 --- a/smartgears/r_connector/templates/rusersadd.j2 +++ b/smartgears/r_connector/templates/rusersadd.j2 @@ -11,6 +11,9 @@ RPROFILE_FILE='{{ r_connector_rprofile_path }}/{{ r_connector_rprofile_filename if [ -d $HDIR ] ; then logger "$LOG_PREFIX user $HDIR directory exists" + sudo /usr/bin/touch ${HDIR}/{{ r_connector_userconfig }} + sudo /bin/chown ${USER}:{{ smartgears_user }} $HDIR/{{ r_connector_userconfig }} + sudo /usr/bin/setfacl -m u:${USER}:rw,g:{{ smartgears_user }}:rw $HDIR/{{ r_connector_userconfig }} exit 0 else if id -u $USER >/dev/null 2>&1 @@ -21,9 +24,9 @@ else sudo /bin/chmod g-wr,o-rwx $HDIR sudo /usr/bin/touch $HDIR/{{ r_connector_userconfig }} sudo /bin/chmod 660 $HDIR/{{ r_connector_userconfig }} - #sudo /bin/chgrp -R {{ smartgears_user }} $HDIR + sudo /bin/chown $USER:{{ smartgears_user }} $HDIR/{{ r_connector_userconfig }} + sudo /usr/bin/setfacl -m u:${USER}:rw,g:{{ smartgears_user }}:rw $HDIR/{{ r_connector_userconfig }} sudo /bin/chgrp {{ smartgears_user }} $HDIR - sudo /bin/chown {{ smartgears_user }}:{{ smartgears_user }} $HDIR/{{ r_connector_userconfig }} sudo /bin/ln -s $RPROFILE_FILE $HDIR/{{ r_connector_rprofile_filename }} exit 0 else @@ -37,6 +40,7 @@ else sudo /bin/chmod g+ws $HDIR sudo /usr/bin/touch $HDIR/{{ r_connector_userconfig }} sudo /bin/chmod 660 $HDIR/{{ r_connector_userconfig }} + sudo /usr/bin/setfacl -m g:{{ smartgears_user }}:rw $HDIR/{{ r_connector_userconfig }} sudo /bin/chgrp -R {{ smartgears_user }} $HDIR sudo /bin/ln -s $RPROFILE_FILE $HDIR/{{ r_connector_rprofile_filename }} exit 0