Menu

SMB4K setting mounted directories to root now

Help
James
2024-05-02
2025-02-16
  • James

    James - 2024-05-02

    Recently SMB4K is setting the user and group to root on the mounted directory. I no longer have permission to view files. I have configured the User ID and Group ID to my user in the common mount settings but this makes no difference. Before Kubuntu 23.10 I did not have this problem. Do I need to change some settings?

     
  • James

    James - 2024-05-03

    I tested by mounting manually using the command:
    sudo mount.smb3 //servername/share /home/username/smb4k/servername/share -o uid=1000,gid=1000,username=user,password=pass
    and the permissions were set to my user and group.

    None of the options in the mount section of SMB4K settings are working. User ID, Group ID under common mount settings and definitely assign the UID, definitely assign the GID always set the mounted directory permissions to root.

     
  • Alexander Reinholdt

    I have the same problem that the shares are mounted as root. So, this seems to be a Samba issue.

    Unchecking the "All or most of the servers support the CIFS Unix extensions" setting on the "Mounting" configuration page and, thus, setting the UID and GID fixed the problem for me. If this does not work for you, please check, if there are custom settings defined for the share.

     
  • James

    James - 2024-05-03

    I just tested again and found that a custom settings were made for the share. When I deleted them it works as expected. I wasn't aware that custom setting are made by default for new shares. Thanks for your help. I will now begin to figure out why the Unix extensions are not working for me.

     
    • Alexander Reinholdt

      That custom settings are made for new shares is a shortcoming. I should fix this.

       
  • James

    James - 2024-05-03

    For future reference the unix extensions do not work with smb3. I found an old thread (https://lists.samba.org/archive/samba/2017-October/211517.html) that states this fact. I'm guessing they have not implemented it yet.

     
  • Alexander Reinholdt

    Thank you for the link. For Samba versions prior 4.20.0, this means, I guess, you should better use SMB protocol version 2.1 for mounting.

    However, I read through the release notes of Samba 4.20.0 and found that there is a new per share setting:

     smb3 unix extensions = yes | no
    

    I set it for a test share to "yes" and now everything works again out of the box with SMB protocol version 3.1.1 and enabled "All or most of the servers support the CIFS Unix extensions" setting.

    Can you please confirm this?

     
  • James

    James - 2025-02-16

    I know this is a really late reply, but I just checked my samba version and it is 4.15.13-Ubuntu
    . I should be upgrading the OS on all my servers this year and will try to post back with results when I do.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.