Mac OS X: file sharing made easy
Objective: to work around Mac OS X's inadequate built-in file sharing facility.
Problem: Mac OS X's built-in file sharing is inadequate: with Tiger, you can only share a user's home directory; although Leopard now allows you to share any folders on your Mac machine, it does not give you ability to fine tune the access control. More over, you need to remember the names of all shares you have created.
Solution in brief: just create soft links to all the folders you would like to share in your home directory. This way, sharing your home directory also enable you to share any other folders on your Mac OS X.
Solution in detail: Why not create soft links to all the folders you would like to share, and put these links to a central place within your home directory? The soft links will be resolved to the actual folders when the shares are accessed over a LAN.
Say you would like to share the follow folders/volumes: /Volumes/data, /Volumes/backup, and /Volumes/media/videos.
Step 1: enable file sharing - System Prefences -> Sharing, check "File Sharing", click "Options...", check "Share files and folders using SMB" if you would like to enable Windows or Linux to securely access the shares, check your account name (e.g. john), click "Done".
Step 2: create a directory (e.g. share) within your home directory to hold all the shares - type the follow command in a terminal (NOTE: change john to your user name):
Problem: Mac OS X's built-in file sharing is inadequate: with Tiger, you can only share a user's home directory; although Leopard now allows you to share any folders on your Mac machine, it does not give you ability to fine tune the access control. More over, you need to remember the names of all shares you have created.
Solution in brief: just create soft links to all the folders you would like to share in your home directory. This way, sharing your home directory also enable you to share any other folders on your Mac OS X.
Solution in detail: Why not create soft links to all the folders you would like to share, and put these links to a central place within your home directory? The soft links will be resolved to the actual folders when the shares are accessed over a LAN.
Say you would like to share the follow folders/volumes: /Volumes/data, /Volumes/backup, and /Volumes/media/videos.
Step 1: enable file sharing - System Prefences -> Sharing, check "File Sharing", click "Options...", check "Share files and folders using SMB" if you would like to enable Windows or Linux to securely access the shares, check your account name (e.g. john), click "Done".
Step 2: create a directory (e.g. share) within your home directory to hold all the shares - type the follow command in a terminal (NOTE: change john to your user name):
mkdir /Users/john/shareStep 3: create soft links for the shares - type the follow commands in a terminal:
cd /Users/john/shareIt's done. On a Windows machine, you can map the share, say your Mac machine's IP is 192.168.0.2. Map a network drive with \\192.168.0.2\john, provide your user name (i.e. john in this example) and password. Now you'll be able to access all shares within the share folder.
ln -s /Volumes/data/ data
ln -s /Volumes/backup backup
ln -s /Volumes/media/videos videos
Comments
No new comments allowed (anymore) on this post.