5 Replies Latest reply: Feb 4, 2008 5:07 PM by MrHoffman
Chris Neely Level 1 Level 1 (0 points)
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,370 points)
    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
  • Chris Neely Level 1 Level 1 (0 points)
    Thanks for the help, but that did not solve the problem. See below:

    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
  • MrHoffman Level 6 Level 6 (13,020 points)
    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
  • Chris Neely Level 1 Level 1 (0 points)
    Sorry, still returned the same error using "DOMAIN\\cyber\ managers".

    chmod: Unable to translate DOMAIN\cyber\ to a UID/GID: Invalid argument
  • MrHoffman Level 6 Level 6 (13,020 points)
    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?