Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mount the shared directory in samba server with writable permission? [closed]

Create a directory:

mkdir  /tmp/shared

Mount the directory in samba server:

sudo mount -t cifs -o user=smb  //192.168.31.21/shared    /tmp/shared
Password for smb@//192.168.31.21/shared:  ***

It is mounted, and can list all files in it:

ls  /tmp/shared

The file can't be saved after editing it - error:

Failed to save the document
permission denied

How to mount the shared directory in samba server with writable permission?

like image 377
showkey Avatar asked Sep 05 '25 03:09

showkey


1 Answers

Do you have set writeable = yes in your /etc/samba/smb.conf

To allow all users to access and write:

 [share]
 path = /shared
 browseable = yes
 read only = no  
 writeable = yes
 browseable = yes
 public = yes
 create mask = 0644
 directory mask = 0755

Depending on your distro /etc/init.d/samba restart or systemctl restart smb


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!