0

Allow me to elaborate on the title.

I have a folder in ~/Documents named "Share" (~/Documents/Share). I enabled sharing for this folder by right clicking it in the nautilus explorer and clicking on the "Local Network Share" button. The Allow others to create and delete files in this folder and Guest access options are enabled.

My two windows machines can read/write to this folder just fine. However, when the windows machines create files/folders in the shared folder, I cannot edit them locally on the linux host.

Here's a screenshot of the local shared folder ~/Documents/Share: Screenshot

Also interestingly, any files created on the local linux host are read only on the windows end. I ran the command mkdir CreatedByLinux while inside the Share folder, and this is what occured on windows when I tried adding a new file to the CreatedByLinux folder: Screenshot

The gist:

Inside the shared folder ~/Documents/Shared:

  • Files created by windows cannot be modified locally
  • On windows, files created by linux cannot be modied

I want to be able to allow both the local linux host and all clients to have FULL read/write permissions to the Shared folder, including applying these permissions automatically to any newly created files/folders. How would I do this?

Technical info :

Linux host : Ubuntu 18.10

0

You created a guest accessible Samba Usershare. When the guest user on Windows accesses that share a line in /etc/samba/smb.conf is invoked: map to guest = Bad User

A "Bad User" is one in which the user name and password that is passed by Windows is not contained in the samba password database. A guest user will not be in the samba password database so it will be "mapped" to the default guest user in Samba which is the user "nobody".

The easiest way to resolve this issue if to add a line to /etc/samba/smb.conf - right under the workgroup = WORKGROUPline - that forces the guest user to look like you for these shares:

force user = binarybyte

Then restart smbd:

sudo service smbd restart

The Windows guest user will now appear to be you for your samba shares. Any new file or folder added by Windows will save with owner = binarybyte not nobody.

  • Hey that worked! Thank you so much! Is there a link or something that contains all of the options for smb.conf? – BinaryByte Apr 18 at 19:17
  • Open a terminal and run: "man smb.conf" But I warn you some of the things in there are written in Klingon so ..... – Morbius1 Apr 18 at 19:22
  • (thumbs up for the star trek reference) Yeah looking through it now, it is a bit confusing. – BinaryByte Apr 18 at 20:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.