To make a Samba share writable on a Unix or Linux system, you will need to edit the Samba configuration file and set the appropriate permissions on the shared directory.
The Samba configuration file is typically called smb.conf
, and it is located in the /etc/samba
directory. You will need to edit this file using a text editor, such as vi
or nano
, and add or modify the following lines:
[sharename] path = /path/to/shared/directory writable = yes browseable = yes public = yes create mask = 0666 directory mask = 0777
Replace sharename
with the name of the share that you want to make writable, and /path/to/shared/directory
with the path to the shared directory on the Unix or Linux system.
The writable
and public
options allow users to write to the share, and the create mask
and directory mask
options set the default file and directory permissions for newly created files and directories.
After you have made the necessary changes to the Samba configuration file, you will need to restart the Samba service for the changes to take effect. To restart the Samba service, you can use the service
command, followed by the name of the Samba service and the restart
argument. The name of the Samba service may vary depending on the specific Unix or Linux system and Samba installation that you are using.
For example, on many systems, the Samba service is called smbd
, and you can use the following command to restart it:
service smbd restart
On some systems, the Samba service is called samba
, and you can use the following command to restart it:
service samba restart
It is important to note that the syntax and arguments for the service
command may vary depending on the specific Unix or Linux system that you are using.
For more information about configuring Samba shares and managing the Samba service on your specific Unix or Linux system, you can consult the documentation for your system. You can also use the systemctl
command to manage services on some systems.