Find the answer to your Linux question:
Results 1 to 5 of 5
I have managed to get a ftp server up and running. The problem is that the different users can't delete or move anyone else's uploads. There are four users all ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2004
    Posts
    5

    Group ownership of new folders and files


    I have managed to get a ftp server up and running. The problem is that the different users can't delete or move anyone else's uploads. There are four users all part of group "requestafile". I have set umask = 002 for all of the ftp folders and files (rwxrwxr-x). three of the users don't belong to another group, and the fourth (me) does (group "andrew").

    Everyime I create a dirctory or file it has the owner andrew:andrew, and everytime anyone else creates a directory/file it has the group ownership as :user.

    So how can I set it so that every folder/file created in the ftp belongs to group :requestafile?

    Thanks.

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    What is the UID/GID of the directories? For users fo the requestafile group to manipulate files in those directories, the directories have to be owned by the requestafile group.

  3. #3
    Just Joined!
    Join Date
    Feb 2004
    Posts
    5
    The GID of the directories is Group User (100) when other people create them or Group Andrew (500) when I create them. I want every file and folder created to be created as requestafile group (502) within the FTP site.

    Is there a default group that folders are created in? So if one user was part of two different groups, what tells the OS which group is to be the owner of the files?

  4. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    The kernel has a perception of the primary GID of a process, which is used for, among other things, to determine what GID to put on newly created files/directories. The primary GID is the GID that is specified for the user in the /etc/passwd file.
    For example, this is the line for myself in my passwd (which is distributed by NIS, but still has the same format):
    Code:
    fredrik:x:500:100:Fredrik Tolf:/home/fredrik:/bin/bash
    That means that my UID is 500, and my primary GID is 100. I have some auxiliary groups as well, but GID 100 is the primary.

  5. #5
    Just Joined!
    Join Date
    Feb 2004
    Posts
    5
    Thanks heaps. Exactly what I was after

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •