I'm setting up a linux SqueezeCenter server for a household that is all Mac. What's the standard way that linux folks share files with Macs? NFS? Samba and have the macs connect via cifs? I want to make it as easy as possible for these folks to be able to push new content into the SqueezeCenter library.
Results 1 to 5 of 5
Thread: Sharing files with macs
2009-03-07, 11:21 #1
Sharing files with macs
2009-03-07, 12:12 #2
- Join Date
- Jun 2007
Otherwise sshfs could be an option when the folks also want to access the files they store on the server with apps on their Macs seamlessy.
Samba is overkill imho (and I couldn't set it up properly ).
2009-03-07, 12:34 #3
Can you tell me more about sshfs? I take it that both fuse and sshfs would have to be installed on each mac client, yes? Does the linux server need anything other than sshd to be running?
2009-03-07, 12:54 #4
- Join Date
- Jun 2007
No, sshd is enough.
But I must admit that I used it only briefly on my brothers' iBook (it worked, though!) and use it regularly only in Linux where it is dead easy to set up (to edit tags on my squeezecenter server for example ).
And fter looking it up again for Mac it seems to me that probably it is too much hassle to set up and mantain on many computers you haven't easily access to.
2009-03-07, 13:54 #5
- Join Date
- Apr 2008
- Paris, France
Best choice is to install netatalk on the linux server. The macs will see AFP volumes, they will feel at home. Netatalk is quite easy to configure.
NFS is also a good choice, but X.5 only. Under X.4, the NFS/Finder relationship is of the love-hate kind.
Samba is ok, but much slower than AFP on macs. Configuring samba is much more complicated than configuring netatalk.
For the underlying FS, I use ext3 all the time. You could use HFS+ as well, but right now I fail to see an advantage to it. Perhaps when trying to use a volume for TimeMachine backups?
UPDATE: FYI, the contents of my conf files. /etc/netatalk/AppleVolumes.default file:
# <Tons of comments truncated > # # By default all users have access to their home directories. #~/ "Home Directory" /var/data/audiotheque "Audiotheque" cnidscheme:cdb /home/mom "Mom" cnidscheme:cdb options:usedots
Now, the /etc/netatalk/afpd.conf file:
# <Tons of comments truncated > # default: # - -transall -uamlist uams_clrtxt.so,uams_dhx.so -nosavepassword "Otto" -tcp -uamlist uams_guest.so,uams_dhx.so -noddp -guestname "mom"
Finally, my /etc/defaults/netatalk file, which is used under Debian to overload the settings of the various files in /etc/netatalk. It's a bit messy, sorry. The idea is to avoid starting totally obsolete apple stuff, like appletalk printer sharing and the like, which would go unused anyway, and really slow down server startup:
# Change this to increase the maximum number of clients that can connect: AFPD_MAX_CLIENTS=20 ## 150908: I REMOVED THOSE MARKED BY "##" . ##ATALK_NAME=`/bin/hostname --short` # specify the Mac and unix charsets to be used ATALK_MAC_CHARSET='MAC_ROMAN' ATALK_UNIX_CHARSET='LOCALE' # specify this if you don't want guest, clrtxt, and dhx # available options: uams_guest.so, uams_clrtxt.so, uams_dhx.so, # uams_randnum.so #AFPD_UAMLIST="-U uams_dhx.so,uams_clrtxt.so,uams_randnum.so" # Change this to set the id of the guest user ##AFPD_GUEST=mom # Set which daemons to run (papd is dependent upon atalkd): ##ATALKD_RUN=yes ATALKD_RUN=no ##PAPD_RUN=yes PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no # Control whether the daemons are started in the background ATALK_BGROUND=yes # export the charsets, read form ENV by apps export ATALK_MAC_CHARSET export ATALK_UNIX_CHARSET
I guess the stock binary in current linux distros is fixed and works with X.5 clients. If not, I have a .deb file for i386 if you need.
Now, if you want to be nice, you can also make sure that Avahi sends some info, which is cool for mac clients which rely so much on Rendez-vous for networking. In /etc/avahi/services I have 2 files, one for the AFP service, another for Squeezecenter that runs on the server. I don't know if the AFP one is useful, I'd expect netatalk to dynamically advertise its presence. SC7 on linux does not, so a static file is required.
<?xml version="1.0" standalone='no'?><!--*-nxml-*--> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> </service-group>
<?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">SqueezCenter on %h</name> <service> <type>_http._tcp</type> <port>9000</port> <txt-record>path=/</txt-record> </service> <service> <type>_slimhttp._tcp</type> <port>9000</port> </service> <service> <type>_slimcli._tcp</type> <port>9090</port> </service> </service-group>
# ... # See avahi-daemon.conf(5) for more information on this configuration file! [server] host-name=otto domain-name=local #browse-domains=0pointer.de, zeroconf.org use-ipv4=yes use-ipv6=no #check-response-ttl=no #use-iff-running=no enable-dbus=yes #disallow-other-stacks=no #allow-point-to-point=no [wide-area] #enable-wide-area=yes [publish] disable-publishing=no disable-user-service-publishing=no #add-service-cookie=yes publish-addresses=yes publish-hinfo=yes publish-workstation=yes publish-domain=yes #publish-dns-servers=192.168.50.1, 192.168.50.2 publish-resolv-conf-dns-servers=yes publish-aaaa-on-ipv4=yes publish-a-on-ipv6=no [reflector] #enable-reflector=no #reflect-ipv=no [rlimits] #rlimit-as= rlimit-core=0 rlimit-data=4194304 rlimit-fsize=0 rlimit-nofile=30 rlimit-stack=4194304 rlimit-nproc=3
However, avahi seems to be grumpy upon wake-on-lan. On an Intel machine, I have no problems at all. On an AMD with the exact same config, I have to reload the avahi daemon as part of the wake-up process, otherwise it fails to advertise the services again.
Finally, you can also create an avahi .service file pointing, say, to static HTML help pages on the server, or elsewhere. This bonjour tab can get quite useful once you've started using it. Here is, for example, a pointer to the local phpsysinfo server status page:
<?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h System Monitor</name> <service> <type>_http._tcp</type> <port>80</port> <txt-record>path=/phpsysinfo/index.php</txt-record> </service> </service-group>
UPDATE 2: Some useful links.
- ht tp://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/ (general info, getting old, don't miss the most current comments at the bottom of the page)
- ht tp://www.flokru.org/2008/02/29/time-machine-backups-on-network-shares-in-leopard/ and
ht tp://www.flokru.org/2008/03/15/time-machine-backups-on-network-shares-2-possible-problems/ (TimeMachine workaround still needed and explained. Using HFS+ as the native FS brings no improvement, I just tried; Netatalk v2.1 should deprecate this.)
- ht tp://www.sanityinc.com/articles/mac-screen-sharing-with-linux (Screen sharing: access the linux server GUI with a simple click in the Finder's left panel. This works easy, unless using the wrong VNC server implementation on the linux server --recent VNC protocol version needed. VNC4 free edition was *not* working some months ago, tightvnc was ok)
UPDATE 3: One last comment. If you're interested in centralized backups, for macs and about any other platform: have a look at backuppc.sf.net . The (perl) backuppc server pings machines regularly, then connects and does backups. The system is server centric, while TimeMachine is client-centric. I've started doing backups of my machines (macs, linuxes, win XP --well, not really) using backuppc 2 years ago. Almost 0 maintenance required since then, and works beautifully. Backups/restore/status via a web interface. Wonderful software, plagued with a lousy name.
Last edited by epoch1970; 2009-03-08 at 08:22. Reason: Added external links: general info, TM backups, screen sharing