Problems with permissions on user group

Discussion in 'Mac OS X Server, Xserve, and Networking' started by wauwter, Oct 5, 2010.

  1. wauwter macrumors newbie

    Joined:
    Oct 5, 2010
    #1
    Hi there,

    I'm setting up a small Mac network with the latest version of Mac OS X server. But I'm having some troubles with the permissions of user groups.
    We have 1 main user group in there are 8 users, which are all allowed to read and write. But sometimes when user A creates a directory, user B (which are still in the same user group) doesn't have access to it.

    In Server Admin -> File sharing I've already given the user group full control to all Child folders/files. So I've no idea what keeps going wrong.

    Maybe I've done it wrong in the beginning, so I want to setup the permissions from the start.

    Is there a way (maybe in Terminal) to clean all the permissions settings of one particular folder and set it up again?
    So to clarify: it's very important that when user A creates (or copies) a folder, it's still owned and accessible for the whole user group.
    Thanks in advance.
     
  2. MacKeeper-fan macrumors member

    MacKeeper-fan

    Joined:
    Jun 30, 2010
    #2
    Changing file permissions on the Mac is something you need to know how to do if you want to create your own non-home directory only shares on the Mac. Leopard implements folder sharing similarly to the way SharePoints does. I find myself needing to change permissions regularly because certain programs like to change file permissions on their own. The Terminal is generally better for changing permissions because it is much faster and also because you have more control. Sometimes you may need to do this is the file permissions get messed up in Leopard's File Sharing under System Preferences.

    Here's how it works:


    * First, open the Terminal, then use the command 'cd'. For example, if you wanted to change to your Desktop directory, you would type:

    cd ~/Desktop

    to change to your desired directory. Note that the tilde '~' represents your home directory.
    The command 'ls' then shows the files within the current directory. You can also use:

    ls -la

    The 'l' switch lists files in long format, and the 'a' switch lists all files, including hidden ones.
    If you are the owner of a file, you have the ability to change its permissions with the command:

    chmod

    There are several ways chmod can be used, however I will only focus on the octal system. The first number represents the owner's permission, the 2nd represents the groups permission, and the last one represents the world's or everyone's access. The permission is calculated using simple arithmetic.

    The first number represents the access granted to the file's owner. The next number, represent access granted to the file's group owner, and the last number represents everyone else's level of access. The possibilities for permissions include: read (4), write (2), execute (1), and no permission (0).

    The permission is set using the chmod command:

    chmod 755 filename

    However a more practical use of the command would be:

    sudo chmod -R 755 directoryname

    This command will recursively change the permissions on all files and folders contained within that directory because we used -R.

    Okay, so just to rehash again:
    The 7 comes from 1 + 2 + 4. This means read, write and execute permission (for the owner).
    The 5 comes from 1 + 4. This means execute and read permission (for the group).
    The 5 comes from 1 + 4. This means execute and read permission (for everyone).

    This means that the file's owner has read, write, and execute permission, but group and world only have read and execute permissions. Managing file permissions on the Mac isn't that difficult once you get the hang of it. And doinging it youself if more powerful that using Disk Utiity, however you should take care as you can screw things up when using the sudo (root permission) command.
     
  3. wauwter thread starter macrumors newbie

    Joined:
    Oct 5, 2010
    #3
    Wow, you are a real hero! You've explained it so clearly!
    Thank you very much!!
     

Share This Page