Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: Ubuntu Shared Folder

  1. #11
    Join Date
    Dec 2009
    Beans
    5,368

    Re: Ubuntu Shared Folder

    I just used a group that is already created and ready for use. Back in the before time all new users were members of the plugdev group by default. But now only the first user created is a member so you will have to add all the other users to that group.

    As I recall it was created so users could access hot-pluggable devices - usb, cameras, etc....

    EDIT: oops, posted past each other.
    Last edited by Morbius1; November 23rd, 2013 at 07:41 PM.

  2. #12
    Join Date
    Nov 2013
    Beans
    22
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Shared Folder

    when I put sudo chown lugdev into the terminal it says chown: missing operand after `lugdev'

  3. #13
    Join Date
    Nov 2013
    Beans
    22
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Shared Folder

    also how do I enter code in it's own box like you did?... I didn't mean to put in those smileys

  4. #14
    Join Date
    Dec 2009
    Beans
    5,368

    Re: Ubuntu Shared Folder

    You have to specify the path to the folder whose permissions you want to change;
    Code:
    sudo chown :plugdev /home/Shared
    You put the code tags around things by highlighting what you want and select "#" in the forum editor.

  5. #15
    Join Date
    Dec 2009
    Beans
    5,368

    Re: Ubuntu Shared Folder

    Note: I had to make an edit to my original post concerning editing /etc/upstart-xsessions for Ubuntu 13.10. I just did this on a new system and even that workaround doesn't work reliably so either wait for the update if it ever comes, wait till the next release, or use bindfs if you want both users to be able to edit each others files.

  6. #16
    Join Date
    Nov 2013
    Beans
    22
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Shared Folder

    ok, I got the shared folder to work but now it won't allow access to the folder within it on my wife's profile... is there a way to set the same permissions for all the folders within the shared folder or do I need to run the code each time I create a folder in it?

  7. #17
    Join Date
    Dec 2009
    Beans
    5,368

    Re: Ubuntu Shared Folder

    The other user doesn't have access to the subfolders of the share?

    Can you post the output of this command becasue I don't understant how that's possible:
    Code:
    ls -al /home/Shared
    I don't know what folder you are sharing so replace /home/Shared with it's real path.

    And what version of Ubuntu are you using?

  8. #18
    Join Date
    Nov 2013
    Beans
    22
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu Shared Folder

    Code:
    drwxrwsr-x  18 root  plugdev 4096 Nov 23 16:08 .
    drwxr-xr-x   5 root  root    4096 Nov 23 12:44 ..
    drwxrwxr-x  20 blaze blaze   4096 Nov  5 14:01 Audiobooks
    drwxrwxr-x   3 blaze blaze   4096 Nov 18 19:37 Backup Info
    drwxrwxr-x   3 blaze blaze   4096 Nov  6 17:38 Bass Guitar
    drwxrwxr-x  52 blaze blaze   4096 Nov 16 12:26 Books
    drwxrwxr-x   2 blaze blaze   4096 Nov 15 12:38 Chord Sheets
    drwxrwxr-x   3 blaze blaze   4096 Nov 12 17:57 Code
    drwxrwxr-x   4 blaze blaze   4096 Nov 19 17:51 Compositions
    drwxrwxr-x   2 blaze blaze   4096 Oct 24 17:40 Drums
    drwxrwxr-x   2 blaze blaze   4096 Nov 14 14:16 Lead Sheets
    drwxrwxr-x   2 blaze blaze   4096 Nov  6 15:23 Miranda
    drwx------ 116 blaze blaze   4096 Nov 23 14:19 Music
    drwxrwxr-x   2 blaze blaze   4096 Sep 23 15:29 Pictures
    drwxrwxr-x   3 blaze blaze   4096 Oct 11 13:22 Software
    drwxrwxr-x   3 blaze blaze   4096 Oct 10 17:15 Ukulele
    drwxrwxr-x   4 blaze blaze   4096 Oct 16 15:40 Videos
    drwxrwxr-x   3 blaze blaze   4096 Nov 16 23:04 Websites
    I'm using 12.04

  9. #19
    Join Date
    Dec 2009
    Beans
    5,368

    Re: Ubuntu Shared Folder

    THe other user has access just not write access - I got it. You need to do a recursive chown to change all existing folders and files to have plugdev as group:
    Code:
    sudo chown -R :plugdev /home/Shared
    EDIT: Have to shut down for the day so I'll check in again tomorrow.
    Last edited by Morbius1; November 24th, 2013 at 12:49 AM.

  10. #20
    Join Date
    Dec 2009
    Beans
    5,368

    Re: Ubuntu Shared Folder

    Let me try to clean this up a bit so that it looks more coherent.

    To share a directory using the standard method one creates a directory:
    Code:
    sudo mkdir /home/Shared
    Then one changes the group of the folder - in this case to plugdev:
    Code:
    sudo chown :plugdev /home/Shared
    Then one sets permissions to set the sgid bit so that all new files "inherit" that group and allow that group to write to the directory:
    Code:
    sudo chmod 2775 /home/Shared
    Then one adds files/folders to that directory by either creating new files or copying over old files. A move to the directory will not work it has to be a copy.

    From what I can tell from your post you instead did this on an existing directory or perhaps you moved files/folders to the new directory. In this case you will need to do 2 things to correct for permissions:

    A recursive chown so all entries have plugdev as group:
    Code:
    sudo chown -R :plugdev /home/Shared
    And then recursively setting the sgid bit on all existing subdirectories - but not files using this butt ugly expression:
    Code:
    find /home/Shared -type d -exec chmod g+s {} \;
    Just remember that this works for all new files created in and any files copied to the folder - but not with files moved to the folder. A move is not a copy-then-delete it's a change to the part of the file that specifies it's path so the sgid bit has no affect on it. If you do a lot of moving to this directory I would strongly suggest bindfs.

    Also Note
    : The standard method does not work properly in Ubuntu 13.10 because umask is hopelessly broken. The bug was classified as "fixed released" and the bug report was for 13.10 specifically but the fix was made for 14.04 not 13.10. Will the fix be relased for 13.10? There really isn't any incentive by Ubuntu to do so but you may get lucky. Again, bindfs is my recommendation to circumvent this issue in 13.10.
    Last edited by Morbius1; November 24th, 2013 at 03:29 PM.

Page 2 of 3 FirstFirst 123 LastLast

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
  •