在 OS X 上安装 Windows smb 共享,以便可以通过“www”访问它 用户
尝试在 OS X 上挂载 smb 共享,以便“www”用户可以从那里读取文件。
SMB 共享可通过 Active Directory 帐户访问。 我可以通过 Finder 挂载共享(cmd-k ...),
但我的基本方法是
# 1) create mountpoint
sudo mkdir /Volumes/www_mdisk
# 2) permissions for mountpoint
sudo chown www:www /Volumes/www_mdisk; sudo chmod 777 /Volumes/www_mdisk
# 3) make a link from apache docroot to mountpoint (http.conf FollowSymlinks is on)
cd /Library/WebServer/Documents; ln -s /Volumes/www_mdisk mdisk
# 4) mount the SMB share using the Active Directory user 'ad_user'
sudo mount_smbfs -O www/www '//DOMAIN;ad_user@smbshare_host/sharepath'
步骤 4 失败。 我已经阅读了手册页,尝试了许多不同的组合(带或不带 -O 开关),但无法让它工作,
你能帮我把它弄对吗? 谢谢!
trying to mount an smb share on OS X so that the 'www' user can read files from there.
the SMB share is accessible via an Active Directory account. I can mount the share through the Finder (cmd-k ...)
my basic approach is
# 1) create mountpoint
sudo mkdir /Volumes/www_mdisk
# 2) permissions for mountpoint
sudo chown www:www /Volumes/www_mdisk; sudo chmod 777 /Volumes/www_mdisk
# 3) make a link from apache docroot to mountpoint (http.conf FollowSymlinks is on)
cd /Library/WebServer/Documents; ln -s /Volumes/www_mdisk mdisk
# 4) mount the SMB share using the Active Directory user 'ad_user'
sudo mount_smbfs -O www/www '//DOMAIN;ad_user@smbshare_host/sharepath'
step 4 fails though. I have read the manpages, tried many different combinations (with or without -O switch), but can't get it to work
can you help me get it right?
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
抱歉,这个答案晚了两年,但我遇到了类似的问题,并且能够或多或少地使用您的步骤解决它。 我按照步骤 1-3 进行操作,然后在步骤 4 中,我使用 sudo 为 _www,而不是使用 -O 选项(因为它不再存在。)
我正在运行 10.6 Snow Leopard,Apache 用户似乎是_www。 不管怎样,在我花了一段时间解决这个问题之后(因为 chown 和 chmod 似乎不适用于已安装的 Samba 共享),这终于成功了。 谢谢!
Sorry this answer is two years late, but I had a similar problem and was able to solve it using your steps, more or less. I followed steps 1-3, and then for step 4, I sudo'd as _www instead of using the -O option (since it doesn't exist any longer.)
I'm running 10.6 Snow Leopard and the Apache user seems to be _www. Anyway, after beating my head against this problem for some time (since chown and chmod don't seem to work on mounted Samba shares), this finally worked. Thanks!
好的,我现在可以在 Mac OS X 10.4 上执行此操作
因此,按照上述步骤,现在在 10.4 上一切正常。
问题是,步骤 4) 在 Mac OS X 10.5 上不起作用。 mount_smbfs 丢失了“-O”选项...
有人知道如何在 10.5 上执行此操作吗?
ok, I can do this now on Mac OS X 10.4
So everything works now on 10.4, following the steps above.
problem is, step 4) doesn't work on Mac OS X 10.5. mount_smbfs has lost the '-O' option...
Anybody knows how to do this on 10.5?