I have done all configurations for file sharing from ubuntu to Windows following this link.

Now I am unable to access the ubuntu shared folder in Windows. I am getting access denied error.


You must have shared in a way that it expects authorization. If so, you'll have to add a user to the samba configuration file or else you'll have to make the share accessible to everyone without authorization.

This link contains the details of creating samba shares :



You can use samba package.

To install Samba

apt install samba -y

To configure samba

mkdir /path/to/fileshare

cp /etc/samba/smb.conf /etc/samba/smb.conf.bkup ; vim /etc/samba/smb.conf

Write this in smb.conf file

path = /path/to/fileshare
read only = no
browsable = yes

Press : and write wq! to save configuration.

Create user for samba

adduser samba ; smbpasswd -a samba

Restart samba

systemctl restart smbd ; systemctl restart nmbd ; ufw allow 'Samba'

Now try to connect from windows

Win + R and write \\samba_server_ip'

Following this link https://ubuntu.com/tutorials/install-and-configure-samba#4-setting-up-user-accounts-and-connecting-to-share

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.