Results 1 to 8 of 8

Thread: Sharing content between local users

  1. #1
    Join Date
    Jan 2009
    Location
    Fuenlabrada, Spain
    Beans
    8
    Distro
    Ubuntu 9.10 Karmic Koala

    Question Sharing content between local users

    Hello. I have installed ubuntu 9.10 in my home laptop and we're a couple os us using it and I would like to have a partition where we are able to share contents and also modify it. So thatm I've created a new ext4 partition but how do I mount it so it belongs to root (or other user) and users group? Is it possible to make that any content we place on the shared folder has the same properties, I mean, belongs to one user but the users in group are able to modify it?

    Thanks.

  2. #2
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: Sharing content between local users

    You mount it by adding an entry in /etc/fstab :

    How to fstab - Ubuntu Forums

    In terms of sharing, you can use shared group, such as users, and set the sticky bit or use ACL.

    http://www.cyberciti.biz/faq/linux-s...red-directory/

    Or use ACL. ACL take a bit longer to learn, but give a finer grain of control.

    See :

    http://ubuntuforums.org/showthread.php?t=145741
    The second link is a nice discussion, see pot #9 for ACL.


    And eiciel is a gui tool

    http://linuxpoison.blogspot.com/2008...or-eiciel.html

    Eiciel is in the Ubuntu repositories, so easy to install.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #3
    Join Date
    Nov 2008
    Location
    S.H.I.E.L.D. 6-1-6
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Sharing content between local users

    just chmod the directory to 777
    Don't waste your energy trying to change opinions ... Do your thing, and don't care if they like it.

  4. #4
    Join Date
    Jan 2009
    Location
    Fuenlabrada, Spain
    Beans
    8
    Distro
    Ubuntu 9.10 Karmic Koala

    Red face Re: Sharing content between local users

    That was great (and fast). Thanks a lot. I'll give a try.

  5. #5
    Join Date
    Jan 2009
    Location
    Fuenlabrada, Spain
    Beans
    8
    Distro
    Ubuntu 9.10 Karmic Koala

    Exclamation Re: Sharing content between local users

    Well. I must be doing something because this http://ubuntuforums.org/showpost.php...21&postcount=9 is not working.
    This is what I've done:
    • Create a new directory: sudo mkdir /shared
    • Change permissions to the directory:sudo chgrp -R users /shared
    • Added this line to the fstab
      Code:
      UUID=a8fce815-8891-4a81-9b40-6ec3d5747a4f  /shared   ext3         rw,suid,exec,users,acl           0  0
    • mount /shared
    • sudo setfacl -dm g:users:rwx /shared
    • getfacl /shared (this produces a good output with the information about the groups)
    • Here comes the problem:
    • cd / && ls -l
      Code:
      drwxr-xr-x+  3 root       root      4,0K 2009-12-08 00:32 shared
    • So that, none of the group users can create,delete under shared

    To be clear, every time I mount the partition it becomes owned by root:root. No matter if the folder is previously owned by root:users, once I mount it, it becomes root:root.

    So, I keep on doing some research, but this is not working. I've to say that I'm running 9.10.
    Last edited by bit_jammer; December 8th, 2009 at 12:15 PM.

  6. #6
    Join Date
    Jan 2009
    Location
    Fuenlabrada, Spain
    Beans
    8
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Sharing content between local users

    Quote Originally Posted by carlee View Post
    just chmod the directory to 777
    Well that's the easy way, but not the way I wanna do. Linux/Ubuntu is supposed to be configurable in that way.
    What I would like (maybe it's not possible) is to have a shared unit where everything belongs to a particular group and any new content has rights for the group.
    Last edited by bit_jammer; December 8th, 2009 at 01:09 PM. Reason: Clarify

  7. #7
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: Sharing content between local users

    Mount the partition.

    then

    Code:
    sudo chown root:group_you_want_for_share /shared
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  8. #8
    Join Date
    Jan 2009
    Location
    Fuenlabrada, Spain
    Beans
    8
    Distro
    Ubuntu 9.10 Karmic Koala

    Wink Re: Sharing content between local users

    Well. I managed to do it. Finally I decided to mount the file system on ntfs. It's not what I wanted, but ....
    This is how my fstab looks like:
    Code:
    /dev/sda8  /home/shared ntfs-3g user,uid=root,gid=shared,fmask=0117,dmask=0007 0 0
    And this is the result:
    Code:
    drwxrwx---  1 root       shared    4,0K 2009-12-08 21:43 shared
    Code:
    bitjammer@bitjammer-hdx-ubuntu:/home/shared$ mkdir foo
    bitjammer@bitjammer-hdx-ubuntu:/home/shared$ ll
    total 0
    drwxrwx--- 1 root shared 0 2009-12-08 21:50 foo
    bitjammer@bitjammer-hdx-ubuntu:/home/shared$ touch file
    bitjammer@bitjammer-hdx-ubuntu:/home/shared$ ll
    total 0
    -rwxrwx--- 1 root shared 0 2009-12-08 21:51 file
    drwxrwx--- 1 root shared 0 2009-12-08 21:50 foo
    Code:
    bitjammer@bitjammer-hdx-ubuntu:/home$ getfacl shared/
    # file: shared/
    # owner: root
    # group: shared
    user::rwx
    group::rwx
    other::---
    If someone manages to make this work with ext3/4, please, let me know
    Last edited by bit_jammer; December 8th, 2009 at 10:20 PM. Reason: Change fmask

Tags for this Thread

Bookmarks

Posting Permissions

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