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

Thread: Going completely crazy on samba shares

  1. #11
    Join Date
    Jul 2009
    Location
    South Africa
    Beans
    168
    Distro
    Ubuntu

    Re: Going completely crazy on samba shares

    Quote Originally Posted by slooksterpsv View Post
    Ok, good to know, I was just reading something where someone said that NFS features weren't available in Home Premium and you had to have Professional or above to get NFS.
    Lol, I didn't know Home Premium didn't have it. Makes sense though. Now I learned something too

    I'm sure there are workarounds like installing 3rd party software or possibly even porting Services for NFS.

  2. #12
    Join Date
    Sep 2010
    Beans
    102

    Re: Going completely crazy on samba shares

    Quote Originally Posted by slooksterpsv View Post
    If you change it to where you have permission to the parent are you able to access the parent and the child? Could be a flow-of-permissions issue.
    I will look into that later today. The strange thing is that I managed to get this set up working before I reinstalled the system.

    So you guys are saying that NFS works with windows? How can I activate the feature for both windows and ubuntu? Must I install a package for ubuntu? Is it integrated into nautilus? Will there be any difference with the flow of permissions (if that is the problem). I mean, do you think it is samba related or does it have those problems anyway?

  3. #13
    Join Date
    Sep 2010
    Beans
    102

    Re: Going completely crazy on samba shares

    Are you sure that NFS only works with windows professional? :/

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

    Re: Going completely crazy on samba shares

    I'm not going to get into the NFS vs Samba debate since they are apples and oranges but:

    You are using two completely different samba methods to share folders - Usershares and Classic-shares. You are sharing folders within folders which is tricky to pull off and often has unintended consequences. And your references to permissions and ownership have me confused. I would propose supplying us with some facts.

    Please post the output of the following commands:
    Code:
    testparm -s
    That will tell us how Samba is configured and show us how your Samba Classic-shares are defined.

    Code:
    net usershare info --long
    That will tell us how your Usershares ( aka nautilus-shares ) are defined.

    Code:
    ls -al /path/to/parent/folder
    This will tell us who owns the parent and all the child folders and what permissions.

    It could be a simple Linux file permissions problem as slooksterpsv already suggested.

  5. #15
    Join Date
    Sep 2010
    Beans
    102

    Re: Going completely crazy on samba shares

    This is the result from:
    Code:
    sudo testparm -s
    Code:
    Load smb config files from /etc/samba/smb.conf
    rlimit_max: rlimit_max (1024) below minimum Windows limit (16384)
    Processing section "[printers]"
    Loaded services file OK.
    Server role: ROLE_STANDALONE
    [global]
        workgroup = ROSENQVIST
        server string = %h server (Samba, Ubuntu)
        map to guest = Bad User
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        unix password sync = Yes
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        dns proxy = No
        usershare allow guests = Yes
        usershare owner only = No
        panic action = /usr/share/samba/panic-action %d
    
    [printers]
        comment = All Printers
        path = /var/spool/samba
        create mask = 0700
        printable = Yes
        browseable = No
    The result from:
    Code:
    sudo net usershare info --long
    Code:
    [media]
    path=/media/Storage/Media
    comment=Filmer, TV-Serier och Musik.
    usershare_acl=Everyone:F,
    guest_ok=n
    
    [storage]
    path=/media/Storage
    comment=Niklas lagring
    usershare_acl=Everyone:R,HOME-SERVER\server:F,
    guest_ok=n
    And the result from:
    Code:
    sudo ls -al /media/Storage
    Code:
    drwxrwx--- 15 server server         4096 2011-03-05 18:41 .
    drwxr-xr-x  3 root   root           4096 2011-02-28 20:58 ..
    drwxrwx---  7 server server         4096 2010-10-27 00:27 Annat
    drwxrwx---  8 server server         4096 2011-03-01 17:59 Backup
    drwx------  2 root   root          16384 2011-01-12 15:10 lost+found
    drwxrwx-w-  4 server storage-media  4096 2011-02-28 21:14 Media
    drwxrwx--- 20 server server         4096 2010-12-30 12:59 Program
    drwxrwx---  2 server server        12288 2011-02-18 18:48 Random bilder
    drwxrwx---  5 server server         4096 2011-02-09 01:12 .Trash-1000
    drwx------  4   1004 server         4096 2011-02-14 17:24 .Trash-1004
    and the folder Media is the child folder being shared. Any ideas? Or is there any more information I should share?

  6. #16
    Join Date
    Sep 2010
    Beans
    102

    Re: Going completely crazy on samba shares

    Is it better to just share the parent and let all the users connect through that, let them browse /media/Storage but no children except Media?

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

    Re: Going completely crazy on samba shares

    Let's get rid of the easy problem first while I stall for time to think about the bigger problem. slooksterpsv was right about the path permisions.

    The permissions on the parent folder /media/Storage is:
    drwxrwx--- 15 server server 4096 2011-03-05 18:41 .
    The only user capable of opening that folder to get to what's inside is user:server. Change that:
    Code:
    sudo chmod 0775 /media/Storage
    We may end up changing that later depending on how we resole this share-within-a-share issue.

    The permissions on the child:
    drwxrwx-w- 4 server storage-media 4096 2011-02-28 21:14 Media
    Um ... assuming all the remote authenticated users are member of the "storage-media" group that just might work as it is. I need to do some testing to see if that will work but it will have to wait a bit until I have more time.

  8. #18
    Join Date
    Dec 2009
    Beans
    5,869

    Re: Going completely crazy on samba shares

    OK, here's the problem and this is what makes shares within shares such a tricky thing to pull off.

    If I as a remote user go through the /media/Storage share I can only read no matter what is permitted on the /media/Storage/Media share because I'm under the control of the storage share authentication.

    If I go through the /media/Storage/Media share directly then I can get write access but only if I'm a member of the storage-media group.

    I think this is going to be too confusing to the user so this is what I would propose:

    (1) In nautilus reset the share on /media/storage to "Allow others to create and delete files in this folder".

    (2) Still in Nautilus - "unshare" entirely the /media/Storage/Media share.

    (3) Nautilus-share automatically modifies the permissions on /media/Storage to 777 so you will have to override this:
    Code:
    sudo chmod 0775 /media/Storage
    So far when the remote user accesses the /media/Storage share he will be allowed to write by samba but prohibited to write by Linux because only user:server and group:server can write to the folder.

    The exception to that will be the /media/Storage/Media directory and only if the remote user is a member of the storage-media group. So:

    (4) For every remote user that you want to have write access to /media/Storage/Media you need to add them to the storage-media group:
    Code:
    sudo gpasswd -a remote-user-name storage-media
    (5) After you add all the users to the storage-media group logoff and login again.

  9. #19
    Join Date
    Sep 2010
    Beans
    102

    Re: Going completely crazy on samba shares

    THANK YOU! That solved it!

    The only thing I did differently was that instead of setting:
    Code:
    sudo chmod 0775 /media/Storage
    I set it to:
    Code:
    sudo chmod 0750 /media/Storage
    Since I don't want others to be able to make changes within Storage but I understand now that they need to be able to navigate it to gain access to /media/Storage/Media which they now do

    Thank you everyone who have been contributing and especially Morbius1!

  10. #20
    Join Date
    Sep 2005
    Beans
    1,607
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Going completely crazy on samba shares

    The basics sometimes are the biggest things we miss.

    I've got that noted in my KeepNote Notebook so I can try to remember it for future reference. Congrats.

    Make sure that you mark the thread as solved under Thread Tools at the top =D
    Dell XP 8700 - Windows 10 64-bit Fast Ring - i7 4790 8GB 1GB 250GB SSD 1TB HDD
    HP Stream 13 - elementary Loki 64-bit
    HP Envy M6 - Windows 10 64-bit

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
  •