vérifier les droits d'accès au répertoire

This commit is contained in:
Jephté Clain 2014-08-20 17:05:48 +04:00
parent c612c3c5a1
commit f4c7269b18
1 changed files with 6 additions and 0 deletions

View File

@ -338,6 +338,12 @@ elif [ "$action" == "add" ]; then
fi fi
dest="$(get_usercrontab "$name")" dest="$(get_usercrontab "$name")"
destdir="$(dirname -- "$dest")"
if [ ! -d "$destdir" ]; then
mkdir -p "$destdir" || die
chmod 750 "$destdir"
fi
copy_update_ask "$uscrontab" "$dest" copy_update_ask "$uscrontab" "$dest"
exit 0 exit 0