*nix fileserver advice needed

stizz

gorilla beta tester
I want to use a *nix flavored fileserver on my all mac network.

My network at home consists of 3 macs and up until now, 1 windows 2000 server.

It is a 1 gHz amd box with only 128mb's of ram, XP was not really an option nor was it desired. The only reason it had 2000 server on it was because I had almost no linux skills back when I set it up.

I know enough about the command line to be dangerous now mostly thanks to osX. Last week I replaced 2000 server with Ubuntu 6.06 Server. I even follwed a detailed 'perfect setup' walkthru and got apache and ssh working among other things.

Afterwards I was left tackling Samba. Afterall,.this boxens main purpose in life was to serve files over the network to my macs. But as I wrestled with the disjointed instructions from 20 different webpages on the subject, and tried in vain to install Swat for a gui interface, I figured there has got to be a better way to skin this particular cat.


What flavor of *nix will be best for a fast and efficient file server on the aforementioned hardware? Ubuntu seemed like a nice choice given the ease of use of thier desktop version, but I'm running into to many complications. Is darwin a real option?

I also want to mount hfs+ drives in this box, ubuntu seemed to choke on that as well even with hfsplus installed. All help and advice greatly appreciated.
 
My understanding was that Linux's support of HFS+ was lousy at best (could be wrong), it would probably be better to just stick to a file system that Linux knows well. I saw somewhere a suggestion to use plain old HFS instead.

I've found samba to be very suitable for my needs. Although I've had my frustrations with setting it up, it's really not that bad. Most of my experience with it has been on either RedHat or Fedora but I have been known to modify my smb.conf on my mac for my own uses from time to time. I wouldn't think that it's that much different on Ubuntu.

Why don't you let us know how you are trying to set things up as well as what problems you were having with configuring samba?
 
I've mounted HFS and HFS+ volumes and partitions without any problems and that was using earlier versions of Debian "sarge" on an old Motorola StarMax 4000 about a year and a half ago.

As for swat, how did you install it? Did you use Synaptic or apt-get to install it or did you go another route? On Debian-based systems (Ubuntu is Debian-based), it's best to use the Synaptic/apt-get option for installing apps. Takes care of all the dependencies and configurations, along with asking you how you want things configured along the way. After that, it's just a matter of loading up swat from the web browser by typing in "http://localhost:901" and then entering the appropriate information for root (haven't played with the server option in Ubuntu, but I'm sure root has to be enabled or allow for authentication as it does on the desktop version if root is still "disabled").
 
I finally did get samba working to the point where I could mount the remote drive on my mac, but I only have read access even tho I set it up read/write.

I added this to /etc/smb.conf

security = user
username map = /etc/samba/smbusers


[big120]
comment = samba server
path = /media/big120
valid users = stizz root
public = no
writable = yes
printable = no
create mask = 0765
inherit permissions = yes

In /etc/samba/smbusers I added :
stizz = "network username"


as for swat, I determined the location of swat to be /usr/sbin/swat and I added the appropriate line in /etc/services :
swat 901/tcp # SWAT Samba Configuration

and /etc/inetd.conf :
swat stream tcp nowait.400 root /usr/sbin/swat swat

I then rebooted the system and tried to connect

root@420:/# lynx http://localhost:901

Looking up localhost:901
Making HTTP connection to localhost:901
Alert!: Unable to connect to remote host.

lynx: Can't access startfile http://localhost:901/

I even tried from one of the macs in safari

http://192.169.0.121:901

Nothing I tried would make swat work, i spent sevral hours messing with it too.

To clarify, I used

apt-get install samba
apt-get install smbfs
apt-get install swat

and everything i'm doing is from a command line since xwindows is not installed. The drive that I'm currently trying to share is linux format ext3. I have a hfs+ drive I would like to eventually add.
 
stizz said:
I finally did get samba working to the point where I could mount the remote drive on my mac, but I only have read access even tho I set it up read/write.

Did you make sure that the unix user you created has write permission to that directory? Also, even though you have specified writable = yes, there is another property called read only, try setting that to no.

Per your swat issue, are you using IP Tables or any sort of firewall? That's usually the 'DOH!' I have whenever I add a new service and I can't connect. If you are using IP Tables try and stop it and see if you can connect then, if so open the port up and start IP Tables again.
 
As I said, I know just enough about the command line to be dangerous.

I'm not sure how to check or set permissions ( iassume chmod has something to do with this?), and IP tables is also a new thing to me.

I know it exists on my system

root@420:~# which iptables
/sbin/iptables

but so far the only command i know to start and stop it does not work

root@420:~# service iptables stop
-bash: service: command not found

this link was where I was getting most of my info about iptables.

getting swat running has become a secondary concern at this time tho, since I have managed to actually mount my remote drive from my mac. I just need to figure out how to set the permissions if that is indeed the issue preventing me from writing. If i can read and write to it, I'll be a happy camper. Adding the new property 'writable = yes' did not make a difference.
 
stizz said:
Afterwards I was left tackling Samba. Afterall,.this boxens main purpose in life was to serve files over the network to my macs.
If you're serving Mac clients, why go with Samba over Netatalk? Why Windows networking instead of AppleTalk? I believe you could run Samba and Netatalk side-by-side, if needbe.

Peace...
 
I've never used Netatalk but it sounds like a good idea to me.

To change permissions you need to use chmod and chown. chmod changes permissions and chown changes ownership.

There are three permission... groups, owner, group, and other. Under that there are three access options for each, write, read, and excecute. if you do a ls -l the permissions and owners for each file.

easy way to change permissions: chmod -R ugo+rwx [file]
the -R flag signifies recursive, so if you are doing a folder you probably want to use -R to get all subfiles and folders. ugo specifies what level you are specifying (u for user, g for group, o for other) you don' have to specify all, just the ones you want to change. The plus means you are adding the following permissions, alternatively, - means revoke. rwx are the permissions you are giving (read, write, excute) it works the same as the user level options.

chown is simply: chown -R onwer:group

So, make sure the unix users you created have write access to the directory you made.

As far as iptables goes, if you don't have the service command, you can always directly run the scripts from the init.d directory, so figure out where it's installed (/etc/init.d/) on a lot of distros and type /etc/init.d/iptables stop

using your init.d directory if different.
 
HateEternal

chmod -R ugo+rwx /media/big120

that was the command that did the trick. My remote drive is now read writable. I thank you for all you help.

I am going to have to do some more reading on iptables. I have restarted other services using /etc/init.d before, so that is something I have to learn more about.

tomdkat

I had never even heard of Netatalk before. I will definately look into it.

The reason I had stuck with samba was twofold:

One, the windows 2000 server I was running prior used samba to share files with the macs and it seemed to work flawlessly. Apple had taken great strides to ensure macs were compatible in a corporate environment with pc's and I had no issues serving my itunes and iphoto libraries this way.

Secondly, although I doubt the problem still exists, (old practices and superstitions die hard) Appletalk used to wreck havoc on a network with computers using midi. This was I think because back in the day of serial ports, midi used those same ports. Using appletalk at this point subconsciously felt like a step backwards.

As an after thought, any clients that show up with pc's will be able to acces my shares if needed.
 
HateEternal said:
chown is simply: chown -R onwer:group
Is a colon used as the separator or is a period used (or does it matter)? I've used:

# chown -R user.group <directory>

But I haven't used the colon syntax.

Peace...
 
stizz said:
One, the windows 2000 server I was running prior used samba to share files with the macs and it seemed to work flawlessly.
Do you mean you actually installed a Samba server on your Win2k box or you were using Windows networking to connect your Macs? They are different things. :)

Secondly, although I doubt the problem still exists, (old practices and superstitions die hard) Appletalk used to wreck havoc on a network with computers using midi. This was I think because back in the day of serial ports, midi used those same ports. Using appletalk at this point subconsciously felt like a step backwards.
I don't know the config of your Macs so I mentioned Netatalk as an option for you to consider, that's all. :)

As an after thought, any clients that show up with pc's will be able to acces my shares if needed.
If running Netatalk would have made the Mac connections go easier or more smoothly, running Netatalk alongside Samba would provide ideal network connectivity for both worlds, plus you have the "coolness" factor of being able to get Linux to network with Windows and Macs using their native "tongues". :)

Glad you got things working...

Peace...
 
Back
Top