Skip navigation
This discussion is archived

Set ACL's via command line

8314 Views 5 Replies Latest reply: Feb 4, 2008 5:07 PM by MrHoffman RSS
Chris Neely Level 1 Level 1 (0 points)
Currently Being Moderated
Feb 4, 2008 12:28 PM
I am trying to set ACL's via the command line. The problem I have is that one of the groups to which I would like to assign read and write permissions for has a space in the name of the group. Is there a special way to handle this? I have tried everything I can think of. For example, the group name is "cyber managers". Below is the command and resulting message.

xserve5:/ admin$ sudo chmod +a "DOMAIN\cyber managers allow readsecurity,readattr,readextattr,list,search,read,execute,writeextattr,writeat tr,delete,deletechild,add_file,add_subdirectory,write,append,file_inherit,directoryinherit" /Volumes/SANVol1/Admin
Password:
chmod: Unable to translate DOMAIN\cyber to a UID/GID: Invalid argument
Mac OS X (10.4.11)
  • Antonio Rocco Level 6 Level 6 (10,100 points)
    Currently Being Moderated
    Feb 4, 2008 1:24 PM (in response to Chris Neely)
    Hi

    You can escape spaces in the command line using the back slash. In your case "cyber managers" would look like this:

    cyber\ managers

    You could have simply created an "untitled folder" on the desktop, launched terminal and drag dropped the newly created folder into it. Terminal would then list the full path name as well as showing you how it handles spaces.

    Hope this helps, Tony
  • MrHoffman Level 6 Level 6 (11,720 points)
    Currently Being Moderated
    Feb 4, 2008 2:55 PM (in response to Chris Neely)
    If you're using escaping with backslashes, and the string itself contains backslashes, then you have to escape any of the literal backslashes present with, wait for it, backslashes.

    DOMAIN\\cyber\ managers
    Mac OS X (10.4.10)
  • MrHoffman Level 6 Level 6 (11,720 points)
    Currently Being Moderated
    Feb 4, 2008 5:07 PM (in response to Chris Neely)
    I've found a few other references to chmod having issues around the space character in its parsing. That this isn't handled correctly appears regrettable.

    Here's [another thread|http://discussions.apple.com/thread.jspa?messageID=5832951] that references this same issue.

    Lob a bug report at Apple, or fix the chmod sources, or remove the spaces, or some combination of these?
    Mac OS X (10.4.10)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.