Mac OS X mkdir: /home/test: Operation not supported

编程技术  /  houtizong 发布于 2年前   415

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.

 

转:http://myth326.blog.163.com/blog/static/122251863201122410491446/

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!

留言需要登陆哦

技术博客集 - 网站简介:
前后端技术:
后端基于Hyperf2.1框架开发,前端使用Bootstrap可视化布局系统生成

网站主要作用:
1.编程技术分享及讨论交流,内置聊天系统;
2.测试交流框架问题,比如:Hyperf、Laravel、TP、beego;
3.本站数据是基于大数据采集等爬虫技术为基础助力分享知识,如有侵权请发邮件到站长邮箱,站长会尽快处理;
4.站长邮箱:[email protected];

      订阅博客周刊 去订阅

文章归档

文章标签

友情链接

Auther ·HouTiZong
侯体宗的博客
© 2020 zongscan.com
版权所有ICP证 : 粤ICP备20027696号
PHP交流群 也可以扫右边的二维码
侯体宗的博客