0

On a new install of Ubuntu (budgie 18.04) I shared the Public folder and set permissions to allow guest access and to create and delete (using the sharing GUI). A networked Windows computer now has access.

I shared another folder (on an external drive, ext4) using the same settings. Windows sees it but says permission denied. Checking permissions with stat -c "%a %n" /path/to/folder shows the same permissions on Public and "test" (the name of the new shared folder).

Exploring further, checking access for user "nobody", sudo -u nobody ls ~/Public lists the files in Public but, trying the new shared folder, sudo -u nobody ls /path/to/test returns permission denied. Going up the path through the root of the external drive and /media/user also gets permission denied. But /sudo -u nobody ls /media succeeds, listing the files in /media.

So it looks like user nobody is blocked in the path ahead of the directory "test". What's wanted is a simple, one step method (I figured the GUI would do this, but evidently not or not always) to share a network folder and allow guest access.

Is this a Samba thing or a permission thing?

Thanks for your time.

0

Your external partition is mounting to /media/$USER/XXX. Linux ( not samba ) permits only $USER the ability to traverse /media/$USER folder to get to the XXX folder. THe remote guest user is not $USER so although the permissions on XXX allow everyone access no access is allowed by Linux.

Since all your shares allow guest access and since you are uing the file manager to create shares I would suggest making the remote user look like you - at least for those shares:

** Edit /etc/samba/smb.conf

** Right under the workgroup = WORKGROUP line add this one:

force user = morbius

Change morbius to your own Linux login user name.

** Then restart smbd:

sudo service smbd restart
  • This worked. I had a vague idea what was the cause but didn't know this about smb.conf. good stuff. – Twelve Kanaw Mar 8 at 14:14

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.