Find the answer to your Linux question:
Results 1 to 2 of 2
Hi!, i new to linux! and im trying to implements mercurial repositories using ssh access. The problem is that if a login via ssh with the user "userA" all file ...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    1

    ssh + force user and group on mkdir

    Hi!, i new to linux! and im trying to implements mercurial repositories using ssh access.
    The problem is that if a login via ssh with the user "userA" all file upload vi that user are created with the owner: userA:userA and i need to use the group of the parent directory... is that posible ?
    For example:
    repos ( root:repo)
    -> project1 ( root:repoPrj1 )
    -> file1 ( userA:usearA ) -> here i want userA:repoPrj1
    The userA al ready belongs to repoPrj 1 group.

    thanks!

  2. #2
    Trusted Penguin Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,392
    It's pretty easy. If the group of the parent directory is already set, use 'chmod g+s [path_of_parent_directory]', and it'll use that group whenever you make files in that directory. You probably don't want to set the owner for files created in here just the group - that way you can give permissions to the group to allow manipulation of the files, yet still know who has been doing stuff.
    Linux user #126863 - see http://linuxcounter.net/

Posting Permissions

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