Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"mount_smbfs" not working in Leopard!

Ave,

I used to run Mac OS X 10.3.9 Panther, and used a neat shell command to mount a Windows Share on a Share Point in my Mac. Using the Share Point, different PHP Scripts in my Web Sites hosted on my Apache Web Server were able to access the files on the windows share.

Following is the shell command I used to mount a Windows Share called "Transfer" on a Share Point on my Mac called "OSM":

*mount_smbfs -u 70 -g 70 //user@192.168.1.2/Transfer ~/Documents/XFER/osm*

This gave Read/Write permissions to files in the 'Transfer' Share.
My PHP scripts could then access the files in such a manner:

*$db = dbase_open("/Users/user/Documents/XFER/osm/file.dbf", 0);*

Unfortunately, none of this is working Leopard. I just upgraded to Mac OS X 10.5.

First of all, mount_smbfs -u 70 -g 70 //user@192.168.1.2/Transfer ~/Documents/XFER/osm fails completely. I get an error that "-u" is not a supported argument. Which tells me that the " mount_smbfs" command has changed in Leopard and does not accept the -u or -g arguments.

If it doesn't, then how am I to mount the shares?

I was able to mount the shares in Leopard by simply using mount_smbfs //user@192.168.1.2/Transfer ~/Documents/XFER/osm ... but when I do this - although the mount does appear and I can browse through the files in Finder - no Permissions have been specified and thus my PHP scripts fail to open files on the share.

Does anyone know what I have to do to be able to mount Windows Shares using mount_smbfs and apply desired Read/Write permissions?
Also, has anything with Share Points changed?

Thanks.

Power Mac G5, Mac OS X (10.5)

Posted on Oct 31, 2007 1:25 PM

Reply
3 replies

Oct 31, 2007 1:48 PM in response to mickey79

I have noticed that many of the options that mount_smbfs used to have are no longer working (the one that is killing me is the -o krb5 flag). However, I am suprised that when you used: mount_smbfs //user@192.168.1.2/Transfer ~/Documents/XFER
that it did not work. If you own the mount point then the rest should be up to the windows side. If that user has write permissions, it should work.

That said, Leopard does some different things with SMB...so all bets are off.
Is this a share hosted on a windows box or linux box?
If linux, you might have getter luck with using AFP via the netatalk package.

Oct 31, 2007 2:03 PM in response to SpaceBass

It's a Windows box, not Linux. SMB has always been the best bet.
Thing is that mount_smbfs //user@192.168.1.2/Transfer ~/Documents/XFER does indeed work, in the sense that it does mount the Share on the Share Point and I can use Finder to browse the files and it's contents.

The problem is that I can't change the UID or GID using -u 70 or -g 70 that I used to do before, to make Apache the owner & group of mounted files - and for PHP to access the files via websites - I NEED to change the UID and GID of the share being mounted.

So basically I need to able to change & specify UID / GID and I don't know how to do that with this new, modified SMB.

"mount_smbfs" not working in Leopard!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.