Results 1 to 3 of 3

Thread: Samba issues

  1. #1
    Join Date
    Feb 2021

    Samba issues

    I've been struggling to share a directory in Ubuntu-Server 20.04 with my Windows machine using samba. The directory is located at /mnt/share. I am using mergerfs to pool my drives in this folder. I have no other users on the network, so I am not too concerned with security on my LAN.
    No matter what options I have used in smb.conf, whenever I tried to write to the share, I would receive the message in Windows: "You need permission to perform this action"

    I've looked up many guides and forum posts on configuring samba, each guide telling me to do something different. The only way that has worked for me was running chown -R nobody /mnt/share, and having the options in smb.conf:

    writeable = yes
    browseable = yes
    read only = no
    guest ok = yes
    create mask = 0777
    directory mask = 0777
    force user = nobody

    But I was wondering what the implications of setting the directory ownership, (and all the files underneath this directory) to nobody, and if there is a better way to go about this.

  2. #2
    Join Date
    Jun 2018

    Re: Samba issues

    Have you created an account for the samba shares?

    #create user with no home and no local login
    sudo adduser --no-create-home --disabled-password --disabled-login the_user_name
    #create a samba password for the user
    sudo smbpasswd -a the_user_name
    Make sure that the user has local read/write access to the shared folder(s). In you smb.conf file let the created user be the owner of the shares (and disable guests, pls).

    Not being concerned about security is a stupid standpoint.
    Have a ubuntastic day!

  3. #3
    Join Date
    Aug 2006
    Ubuntu Mate 20.04 Focal Fossa

    Re: Samba issues

    If you want to modify files in a directory as the user "nobody", that directory has to be readable/writable by "nobody". There is no way to do it without having permission to. ...not sure why it is surprising.
    The implications are being able to modify files.


Posting Permissions

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