diff -Nur smeserver-nextcloud-1.1.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf smeserver-nextcloud-1.1.0/root/etc/e-smith/events/actions/nextcloud-occ-conf --- smeserver-nextcloud-1.1.0.old/root/etc/e-smith/events/actions/nextcloud-occ-conf 2018-04-08 21:56:59.210000000 -0400 +++ smeserver-nextcloud-1.1.0/root/etc/e-smith/events/actions/nextcloud-occ-conf 2018-04-08 22:02:23.304000000 -0400 @@ -202,14 +202,23 @@ # now we could mount home folder for each user using samba -if ($status eq "enabled") { - foreach (@users) { +foreach (@users) { my $key = $_->key; my $id = ""; my $user = $NCusers{$key}; # in case user not already know by NC, skip # normally not necessary, thanks to LDAP!! next if ($user eq ""); + # let's create the root "ibays" folder to mount every ibays in nextcloud user space + my ($login,$pass,$uid,$gid) = getpwnam("www"); + my $idir = "/home/e-smith/files/nextcloud/data/$user"; + unless ( !-d $idir || !-d "$idir/files" || -d "$idir/files/ibays") + { + mkdir "$idir/files/ibays", 0770; + chown $uid, $gid,"$idir/files/ibays"; + } + # we proceed next only if we want the user homes + next unless ($status eq "enabled"); # get existing mount %localmounts = listLocalMounts; # search for our current one @@ -241,7 +250,6 @@ } push @idOK,$id; - } } # set cron