[实践OK]Mac OS X mkdir: mkdir -p /home/xiangdong 出现mkdir: /home/xiangdong: Operation not supported 不指定

jackxiang 2019-2-24 11:55 | |
现象:bogon:tmp root# mkdir -p /home/xiangdong    
mkdir: /home/xiangdong: Operation not supported

目的:fFileZilla SFTP同步Linux上的家目录到Mac上。

解决办法:
sudo vim /etc/auto_master
/home                   auto_home       -nobrowse,hidefromfinder #加上#号
bogon:tmp root# sudo automount
bogon:tmp root# mkdir -p /home/xiangdong      #重启automount后就能成功创建。


Hmmm, trying to create a directory under '/home' on a Mac?

Well, Apple doesn't want you to (with good reason, automounter owns this dir, which makes it easier to do NFS mounts and such) so you shouldn't muck with it but if you really just 'have to do it', here is how you can.

Basically: Edit /etc/auto_master and remove or comment out the line that starts with "/home".

example:
sudo vim /etc/auto_master

before:

# Automounter master map
+auto_master            # Use directory service
/net                    -hosts          -nobrowse,hidefromfinder,nosuid
/home                   auto_home       -nobrowse,hidefromfinder
/Network/Servers        -fstab
/-                      -static
after:

# Automounter master map
+auto_master            # Use directory service
/net                    -hosts          -nobrowse,hidefromfinder,nosuid
#/home                   auto_home       -nobrowse,hidefromfinder
/Network/Servers        -fstab
/-                      -static
to have the change take effect without a reboot:
sudo automount

mkdir /home/test
ls -l /home/
total 0
drwxr-xr-x 3 root admin 102 Aug 10 11:33 test

NOTE: I wouldn't do anything 'important' with this directory as it's easy to forget you altered this and an upgrade will plow over this directory, removing all data. (this dir is also not included in any Time Machine backups.


来自:https://blog.csdn.net/lychao89/article/details/53667068

作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:http://jackxiang.com/post/10103/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!


最后编辑: jackxiang 编辑于2019-2-24 11:58
评论列表
发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]