Ubuntu – Cannot access shared floder on ubuntu from windows 10 meanwhile I have access to default Public folder

networkingpermissionssambashared-folderswindows 10

I installed samba and set this configuration below.

Samba configuration file

By default, I have a "Public" folder that is shared with windows and I can access it from windows with out any problem.

Public Folder

I shared this hard drive "/media/user_name/Data" via Folder Sharing as you can see below.

Share Settings

Unfortunately, I was not able to access this folder via windows, meanwhile I can access the "Public" folder as I mentioned earlier.

I tried the change the access permissions of the "Data" folder. I used the following command.

sudo chmod -R 0777 /media/abdelkrim/Data

This is the message that I get on windows when I try to access it.

Windows error message

I really appreciate your help to solve this issue and make the folder accessible by windows.

Thanks in advance.

Best Answer

The problem isn't the permissions on Data it's the fact that the system sets up an access control on /media/abdelkrim such that only that user can get to Data.

You have two options:

[1] Move the mount point up a level so that it mounts to /media/Data then share that.

[2] Or edit /etc/samba/smb.conf and add a line under workgroup = WORKGROUP :

force user = abdelkrim

Then restart smbd: sudo service smbd restart

Related Question