[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wie public- und incoming-Verzeichnis beim Pureftpd anlegen



Hello Hans-Dietrich Kirmse,

Am 2011-06-21 15:54:55, hacktest Du folgendes herunter:
> >Ansonsten was notfalls immer geht, volkommen unabhängig vom FTP-Server
> >ist ein weiterer mount pro Gast. Alle greifen im unteren fall dann auch
> >/var/public zu.
> >
> >mount --bind /var/public /home/john/public
> >mount --bind /var/public /home/joe/public
> >mount --bind /var/public /home/jule/public
> 
> also für meine 500 User, die sich jährlich in der Größenordnung 80
> User ändern soll ich das machen? Ist Debian immer so kompliziert? :(

    :-D

----8<------------------------------------------------------------------
#!/bin/bash

echo "Neue public Verzeichnisse erstellen für:"
for UIDDIR in $(cut -d ':' -f1,3,6 /etc/passwd)
do
  U_NAME=$(echo "${UIDDIR}" |cut -d ':' -f1)
  U_ID=$(echo "${UIDDIR}" |cut -d ':' -f2)
  U_DIR=$(echo "${UIDDIR}" |cut -d ':' -f3)

  if [ ${U_ID} -ge 1000 ] && [ ${U_ID} -le 65534 ]
  then
    if [ ! -d ${U_DIR}/public ]
    then
      echo "    ${U_NAME}"
      mount --bind /var/public ${U_DIR}/public
    fi
  fi
done

echo "Alte public Verzeichnisse entfernen:"
for DIR in $(ls -d /home/*/public)
do
  grep --regexp="${DIR}" /etc/passwd >/dev/null 2>&1
  if [ $? -ne 0 ]
  then
    echo "    ${U_DIR}"
    umount ${DIR}/public
  fi
done
----8<------------------------------------------------------------------

> Hoffe weiter auf (für mich) praktikable Hinweise.

    =8<O

> Viele Grüße
> Hans-Dietrich

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsystems@tdnet France            itsystems@tdnet
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)             Gewerbe Straße 3
50, rue de Soultz                 77694 Kehl/Germany
67100 Strasbourg/France           Tel: +49-177-9351947  mobil
Tel: +33-6-61925193 mobil         Tel: +49-176-86004575 office

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber linux4michelle@jabber.ccc.de
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature


Reply to: