Results 1 to 3 of 3

Thread: Folder Sharing Between Computer Users

  1. #1
    Join Date
    Dec 2007
    Location
    Cebu, Philippine
    Beans
    182
    Distro
    Lubuntu 20.04 Focal Fossa

    Question Folder Sharing Between Computer Users

    Ubuntu 12.04 with Gnome Classic

    How do I set up a folder so that all uses ONLY of the computer can access the folder read only and I have full access to the folder?

  2. #2
    Join Date
    Apr 2010
    Location
    Cape Breton, Nova Scotia
    Beans
    129
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Folder Sharing Between Computer Users

    Hi rbscairns,

    Do you know chmod? There are various guides/manuals to chmod online since it is a very old unix command. If by "full access" for yourself you mean read/write (i.e. not execute - this will depend on what kind of files they are)? If so then assuming you are the owner of the folder you should be able to use

    Code:
    chmod 644 *
    in that folder to get what you want. But I'd read a chmod tutorial first if I were you.

    I'm somewhat surprised the other users don't have read only access to the folder by default. What is the nature of this folder?

  3. #3
    Join Date
    May 2009
    Location
    Courtenay, BC, Canada
    Beans
    1,661

    Re: Folder Sharing Between Computer Users

    create a shared group
    Code:
    sudo groupadd sharedfolder
    then add the list of users to the group
    Code:
    echo 'user1|user2|etc|...' | while IFS=\| read -r u; do sudo usermod -a -G sharedfolder "$u"; done
    then change the group and permissions of the folder
    Code:
    sudo chown -R user:sharedfolder /path/to/folder
    find /path/to/folder | while read -r f; do if [ -f "$f" ]; then sudo chmod 0640 "$f"; else sudo chmod 0750 "$f"; fi; done

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
  •