在 OS X 上安装 Windows smb 共享,以便可以通过“www”访问它 用户

发布于 2024-07-09 15:59:13 字数 701 浏览 3 评论 0原文

尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

第七度阳光i 2024-07-16 15:59:13

抱歉,这个答案晚了两年,但我遇到了类似的问题,并且能够或多或少地使用您的步骤解决它。 我按照步骤 1-3 进行操作,然后在步骤 4 中,我使用 sudo 为 _www,而不是使用 -O 选项(因为它不再存在。)

sudo -u _www mount_smbfs //User:Password@Host/Share /mount/point

我正在运行 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.)

sudo -u _www mount_smbfs //User:Password@Host/Share /mount/point

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!

软糖 2024-07-16 15:59:13

好的,我现在可以在 Mac OS X 10.4 上执行此操作

# 4) mount the SMB share using the Active Directory user 'ad_user'
sudo mount_smbfs -O www/www -u 70 -g 70 '//DOMAIN;ad_user@smbshare_host/sharepath' www_mdisk

# 5) make sure http.conf has 'Options Indexes' enabled for Docroot
duh.

因此,按照上述步骤,现在在 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

# 4) mount the SMB share using the Active Directory user 'ad_user'
sudo mount_smbfs -O www/www -u 70 -g 70 '//DOMAIN;ad_user@smbshare_host/sharepath' www_mdisk

# 5) make sure http.conf has 'Options Indexes' enabled for Docroot
duh.

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文