##------------## # BindFS # ##------------## apt install -y bindfs #creating folder and setting mount mkdir -p /share/fotos mkdir -p /share/files chmod 775 /share/files chmod 775 /share/fotos chown bram:users -R /share echo "bindfs#/var/www/nextcloud/data/fotos/files /share/fotos fuse force-user=beheerder,force-group=users,create-for-user=www-data,create-for-group=www-data,create-with-perms=0770,chgrp-ignore,chown-ignore,chmod-ignore 0 0" >> /etc/fstab echo "bindfs#/var/www/nextcloud/data/files/files /share/files fuse force-user=beheerder,force-group=users,create-for-user=www-data,create-for-group=www-data,create-with-perms=0770,chgrp-ignore,chown-ignore,chmod-ignore 0 0" >> /etc/fstab mount -a mkdir /share/files/TimeMachine &&chmod 775 /share/files/TimeMachine && chown bram:users -R /share/files/TimeMachine apt install -y netatalk samba cat < /etc/webmin/netatalk3/config netatalk_d=/sbin/netatalk start_netatalk=/etc/rc4.d/S21netatalk start restart_netatalk=/etc/rc4.d/S21netatalk restart license_conf=/opt/netatalk/etc/license.conf stop_netatalk=/etc/rc4.d/S21netatalk stop afp_conf=/etc/netatalk/afp.conf EOF cat < /etc/samba/smb.conf #======================= Global Settings ======================= [global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP #### Debugging/Accounting #### log file = /var/log/samba/log.%m max log size = 1000 logging = file panic action = /usr/share/samba/panic-action %d server role = standalone server obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user ############ Misc ############ # Maximum number of usershare. 0 means that usershare is disabled. # usershare max shares = 100 # Allow users who've been granted usershare privileges to create # public shares, not just authenticated ones usershare allow guests = yes #======================= Share Definitions ======================= [print\$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no [TimeMachine] create mode = 775 directory mode = 775 path = /share/files/TimeMachine [Files] path = /share/files [Fotos] path = /share/fotos EOF cat < /etc/netatalk/afp.conf ; ; Netatalk 3.x configuration file ; [Global] ; Global server settings [TimeMachine] time machine = yes path = /share/files/TimeMachine [Files] path = /share/files [Fotos] path = /share/fotos EOF