Setup the File Sharing Service in Mac OS
To create a share point for AFP you can use the following command: sharing -a <path> -A <share name>
So let’s say you have a directory at /Shares/Public and you want to create a share point called PUBLIC. You can use the following command: sharing -a /Shares/Public -A PUBLIC
Now, the -a here will create the share for AFP but what if you want to create a share for other protocols? Well, -F does FTP (even though FTP is older than I am) and -S does SMB. Once created you can disable the share using the following command: sharing -r PUBLIC
To then get a listing of shares you can use the following command: sharing -l
turn an FTP server on:
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
turn the FTP server off:
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
The FTP user's home folder is defined in the System Preferences "Users and Groups" app. Go to Apple Menu > System Preferences > Users and Groups.
The magic is using the [Control] + [Click] secret option. While holding down the [Control] key, click on the user in the list of users and the secret "Advanced Options" menu will appear. Change the user's home directory to whatever you want in the ensuing options screen.
Then when ever a service (SSH, FTP, etc.) logs in, this configured new home directory will be the starting point.
https://kodejava.org/how-do-i-run-ftp-server-in-os-x/
FTP to Server - zip in advance!
https://www.ftphosting.com/blog/mac-upload-folderaction/
https://smallbusiness.chron.com/schedule-automator-tasks-mac-os-x-39132.html
http://macosxautomation.com/automator/
Probably the MAC OS way to do things like this:
(at the same time be able to shut it down via a menu instead a terminal keystroke: CTRL-S)
Add the following Automator-Program to System Preferences > User&Groups > Startitems:
Start NINJAM Server after reboot with Automator-Program:
Shutdown NINJAM if required via Menu:
Create daily calendar event which will run the above script regularly:
In dieser Sammlung finden sich Notizen zu verschiedenen Bereichen und Themen.
© 2007-2024 - Charly Hotel