Pure-ftp and shared folders - How to set permissions ?

Discussion in 'Server Operation' started by jbenezech, Aug 7, 2013.

  1. jbenezech

    jbenezech New Member

    Hi All,
    Running on Debian, I have a set of users who need to share documents they access by FTP. Only owners of the files can change/delete.
    I created a common group myshare and set it as primary group to user1 and user2.
    I have created a common folder /home/share and mounted (mount --bind) the subdirectory I need into the user1 and user2 home dirs
    I have configured pure-ftp with umasks 137:007
    So directories will be writable by anybody in the group and files readable by all.
    drwxrwx--- 2 user1 myshare 4096 Aug 7 02:55 testdir
    -rw-r----- 1 user1 myshare 0 Aug 7 02:53 testfile

    This is great except that files can be deleted or renamed by anybody in the group.
    I have tried setting the sticky bit for the directories but with no success (I'm not very clear on the sticky bit, is it for others only ?).

    Any recommendation ?

  2. jbenezech

    jbenezech New Member

    Got it working reverting back to different groups for my 2 users.
    user1: user1 myshare
    user2: user2 myshare

    Gave 777 permissions on directories and set sticky bit on upload.
    directory /home/share is owned by root:myshare and permissions are 770 so people outside the group cannot access it.

Share This Page