Mount Samba share allowing users to read/write
If only one user needs read/write access, you can make him owner of the mounted directory using the option uid=<linux_username>
:
mount -t cifs //192.168.1.1/username pc -o uid=<unix_username>,username=username,password=xxxxx
If more than one user need read/write access, you can create a group, add the users to it:
addgroup new_group
adduser user1 new_group
adduser user2 new_group
adduser user3 new_group
then mount the share using options gid
, file_mode
and dir_mode
:
mount -t cifs //192.168.1.1/username pc -o gid=new_group,file_mode=0664,dir_mode=0775,username=username,password=xxxxx
More information: mount.cifs
manual page.