cicada
V2EX  ›  macOS

os x文件夹权限求解

  •  
  •   cicada · May 15, 2013 · 5644 views
    This topic created in 4781 days ago, the information mentioned may be changed or developed.
    由于修改了osx的登录账户(http://support.apple.com/kb/HT1428?viewlocale=zh_CN)
    导致有些在根目录下创建的文件夹无法访问,于是手动将当前用户添加为可读写(command+i)。
    于是ls显示出来之后变成了
    d---r-xr-x+
    最后多了一个加号,google之,说:启用了ACL才会有这个+号,
    有办法取消掉ACL?变成后面没有这个+号?
    10 replies    1970-01-01 08:00:00 +08:00
    sugarit
        1
    sugarit  
       May 15, 2013
    试试 磁盘工具->修复权限
    cicada
        2
    cicada  
    OP
       May 15, 2013
    @sugarit 之前已经试过,但是无效。
    octopus_new
        3
    octopus_new  
       May 15, 2013
    直接chmod -R 777 [你的目录], 这样就可以吧,你的那个文件件现在用户没有任何rxw权限,组和others有r和x权限,很奇怪.....
    47jm9ozp
        4
    47jm9ozp  
       May 15, 2013   ❤️ 1
    try chmod with -N

    from `man chmod`:
    -i Removes the 'inherited' bit from all entries in the named file(s) ACLs.

    -I Removes all inherited entries from the named file(s) ACL(s).

    -N Removes the ACL from the named file(s).
    octopus_new
        5
    octopus_new  
       May 15, 2013
    @ooxxcc 以前上学的时候就不爱审题,现在依然审题错误,还是你给的答案靠谱,哈哈
    47jm9ozp
        6
    47jm9ozp  
       May 15, 2013
    @octopus_new mac的文件权限挺麻烦的,有的时候还会碰到只读flag之类的,到时候你试试chflags

    当时重装系统后为了删除之前的系统文件花了好大功夫。。
    cicada
        7
    cicada  
    OP
       May 15, 2013
    @ooxxcc 按照你之前的哪个命令将ACL remove掉了。
    然后chown改用户和组。
    最后chomd改权限
    看来更改mac os的用户名是比较烦人。
    ybf1220
        8
    ybf1220  
       May 18, 2013
    setfacl 试试看,估计原来的 acl 权限你可能已经不知道具体的内容了。
    getfacl 在 linux 下是查看具体权限的
    allenhsu
        9
    allenhsu  
       May 19, 2013
    sudo chown & chmod 也不管用么?(-RF)
    dorentus
        10
    dorentus  
       May 19, 2013
    @ybf1220 Mac 下没带这两个命令。4 楼的内容是正解。添加/修改 ACL 也是用的 /bin/chmod。

    ref: https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/chmod.1.html
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   962 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 57ms · UTC 19:57 · PVG 03:57 · LAX 12:57 · JFK 15:57
    ♥ Do have faith in what you're doing.