[SOLVED] Samba can not copy or delete directory

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
deepakdeshp
Level 20
Level 20
Posts: 12334
Joined: Sun Aug 09, 2015 10:00 am

[SOLVED] Samba can not copy or delete directory

Post by deepakdeshp »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
altair4
Level 20
Level 20
Posts: 11453
Joined: Tue Feb 03, 2009 10:27 am

Re: Samba can not copy or delete directory

Post by altair4 »

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 20
Level 20
Posts: 12334
Joined: Sun Aug 09, 2015 10:00 am

Re: Samba can not copy or delete directory

Post by deepakdeshp »

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.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
Locked

Return to “Networking”