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.


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

  • Thanks a lot. I used the second solution, It worked like a charm. – Abdelkrim Ibrahim Sep 1 '19 at 17:08

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.