Win10 permission error accessing shared folder [SOLVED]

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
PhilJ
Level 1
Level 1
Posts: 2
Joined: Sun May 13, 2018 12:57 am

Win10 permission error accessing shared folder [SOLVED]

Post by PhilJ »

Hi there - new Linux Mint 18 Cinnamon user.

1. I successfully set up in Nemo the network shares shown at the bottom of my post. Two folders are in /home/phil/ and one is in /media/phil/, this being a folder on a secondary hard drive, partition name /dev/sdb1.
2. All three show up in the Windows 10 Explorer under Network\LINUX-DELL530s.
3. I can open both of the /home/ folders (Music and Pictures) on the Windows box and browse the pictures, play the music etc. I don't get prompted for any credentials.
4. But when I try to open the /media/3D share I get an access error "You do not have permission to access \\Linux-dell530s\3d".
5. So I created a Samba user password for "phil" (sudo smbpasswd -a phil) which is also my username on the Windows box, except it's spelt with a capital "P".
6. When Windows prompted me to enter credentials for Phil I entered the Samba password, but still got the permission error.
7. Wondering if the capital "P" Phil username was the problem, I created a new Linux user called "philwindows" and gave it a Samba password.
8. When prompted I entered username "philwindows" and the Samba password, but still no luck.
9. I have searched for answers on the forums and internet generally, and found the things I tried above, but now I'm stuck.

MY QUESTIONS:

1. WHY DO THE /home/ SHARES WORK BUT NOT THE /media/ SHARE?
2. HOW DO I FIX IT?

Thanks
Phil


phil@Linux-Dell530s ~ $ net usershare info --long
[Music]
path=/home/phil/Music
comment=
usershare_acl=Everyone:F,
guest_ok=y

[3D]
path=/media/phil/STORAGE3/3D
comment=
usershare_acl=Everyone:F,
guest_ok=y

[Pictures]
path=/home/phil/Pictures
comment=
usershare_acl=Everyone:F,
guest_ok=y

phil@Linux-Dell530s ~ $
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: Win10 permission error accessing shared folder

Post by altair4 »

/media/phil was created by the system to act as the parent folder of all temporary mounts such as external USB devices. The system applies special permissions that make it impossible for anyone to traverse the /media/phil folder except phil.

Three choices:

[1] Add the following to /etc/samba/smb.conf - right under the workgroup = WORKGROUP line

Code: Select all

force user = phil
Then restart samba:

Code: Select all

sudo service smbd restart
[2] Change the mount point to one level up from where it is now: /media/STORAGE3

[3] Change the share definition to not allow guest access and force the client to access the share as phil with a samba password for phil.
I know you tried this and I have no explanation for why it did not work. Must be a Mint thing.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
PhilJ
Level 1
Level 1
Posts: 2
Joined: Sun May 13, 2018 12:57 am

Re: Win10 permission error accessing shared folder [SOLVED]

Post by PhilJ »

Thanks altair4 - the force user option in smb.conf and a restart on both boxes did the trick!

Much appreciated,
Phil
Locked

Return to “Networking”