[SOLVED] Samba can not copy or delete directory

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
deepakdeshp
Level 9
Level 9
Posts: 2809
Joined: Sun Aug 09, 2015 10:00 am

[SOLVED] Samba can not copy or delete directory

Postby deepakdeshp » Fri Dec 08, 2017 5:45 am

Hello,
I am able to add and delete files to samba share but can not add directory to the Mint Samba share. Please advise.

the code for the share in smb.conf is

Code: Select all

 path = /home/aimserver/share
valid users = aimserver,aimcomp2,AIMCOMP2-PC
read only = No
writeable = Yes
create mask = 0666
directory mask = 0666
   

aimserver is the Lint user name
Last edited by deepakdeshp on Tue Dec 12, 2017 5:54 am, edited 1 time in total.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 18.3 Cinnamon 64 bit with AMD processor . Memory 8GB

altair4
Level 18
Level 18
Posts: 8832
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba can not copy or delete directory

Postby altair4 » Fri Dec 08, 2017 8:14 am

You want your directory mask to be 0777 not 0666 but I would suggest a different way. Change your share definition to this:

Code: Select all

path = /home/aimserver/share
valid users = aimserver,aimcomp2,AIMCOMP2-PC
read only = No
writeable = Yes
force user = aimserver

"valid users" will restrict access to those on the list but once their credentials are accepted their identities will be changed to the user "aimserver". Everyone will have read / write access to everything in the share. A side benefit is that anything added to /home/aimserver/share by aimserver locally will also be r/w accessible to the valid users. That is something your current share definition will not do.

Side note: It won't do any harm as it is but read only = No and writeable = Yesare redundant. If you run testparm -s samba will through out the writeable = Yes when it interprets your share.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

deepakdeshp
Level 9
Level 9
Posts: 2809
Joined: Sun Aug 09, 2015 10:00 am

Re: Samba can not copy or delete directory

Postby deepakdeshp » Tue Dec 12, 2017 5:53 am

altair4 wrote:You want your directory mask to be 0777 not 0666 but I would suggest a different way. Change your share definition to this:

Code: Select all

path = /home/aimserver/share
valid users = aimserver,aimcomp2,AIMCOMP2-PC
read only = No
writeable = Yes
force user = aimserver


Side note: It won't do any harm as it is but read only = No and writeable = Yesare redundant. If you run testparm -s samba will through out the writeable = Yes when it interprets your share.

The code worked and everything is working. Thank you for your time Altair.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 18.3 Cinnamon 64 bit with AMD processor . Memory 8GB


Return to “Other networking topics”