I have a workflow set up with a linux centos server and 2 windows machines for web development.
Share files with samba in home client public_html cgi-bin
Every time I modify a file from windows I must make a chmod 755 on the modified file
How can I solve that?
2
Answers
I recommend you:
Install visual studio code with the SFTP plugin (https://marketplace.visualstudio.com/items?itemName=liximomo.sftp).
Install FTP on the server (https://jealetecnologia.wordpress.com/2017/04/20/instalar-y-configurar-vsftpd-en-centos-7/)
Link Visual studio code with the server (https://artisansweb.net/ftp-sftp-extension-for-visual-studio-code/).
With this, only saving will be changed on the server and you will not have any problems with persmissions. No need to share folders in samba.
Adding
force create mode = 0755
to /etc/samba/smb.conf
will make all files created using samba have 0755 mask set.
Alternatively, you can use
inherit permissions = yes
Which will make all created files inherit the permissions of their parent directory.