This is an issue relating to file and directory permissions when working with samba and not 16.04. I assume you are setting up a public share and not using logins, and mapping the samba guest user to the user nobody.
Since all samba users will be logged in as nobody, any file saved will inherit the user nobody and group nogroup.
t1.log that is created by the samba guest user has the permissions
-rwxr--r--, and the owner of that file is nobody. Your user pac is not able to modify it as it has only read permission for Others.
One way to resolve this is to remap the samba guest user to your user pac.
Make sure this is set in your
guest account = pac
...then change the ownership for all the files in your share folder to user pac
sudo chown -R pac:pac /path/to/share
Obviously this won't work in a multiuser environment where some other user other than pac needs rw access too.
Some may propose the use of
create mask = 0777 and
directory mask = 0777 in smb.conf for files and directories to be created with -rwxrwxrwx, however in my experience I have found it to be quite unreliable, as over time some files still ended up with some other permissions anyway.
The only reliable solution I have found is to remount the share directory with bindfs to always force 0777 permissions.
First, install bindfs:
sudo apt install bindfs
Then, create a systemd service file:
sudo nano /lib/systemd/system/mount-bindfs.service
Paste this in the file:
# mount-bindfs systemd service file
Description=Remount directories with different permission
ExecStart=/bin/sh -c "/usr/bin/bindfs -o perms=0777 /path/to/share /path/to/share"
Reload systemd, enable the service on boot and start it:
sudo systemctl daemon-reload
sudo systemctl enable mount-bindfs.service
sudo systemctl start mount-bindfs.service
ll on your share folder and everything should appear as