Problem overwriting files on samba network from caja ubuntu 22.04

I'm on ubuntu mate desktop 22.04, and my server running ubuntu mate 20.04. I usually overwrite files on the server remotely using caja, when I tried doing this from ubuntu mate 22.04. I always run into error. This did not happen when I did it from ubuntu 18.04 (before I did fresh install to 22.04).


Now it always shows error everytime i try to overwrite files, although the message under "show more details" says success. It did not.

I tried installing Nautilus to see if it could solve the problem. In fact , It shows the same exact error as caja.

Any thought on this?

can you post the [video] share config in /etc/samba/smb.conf


  path = /somewhere with perms 777
  writable = yes
  guest ok = yes

This is the server's samba config:

	comment = Video Folder
	path = /home/username/Videos
	read only = no

currently I can move/copy/replace(overwrite) file to my server, where the source file is from my desktop.
I do have another separate shared folder named dl.

    comment = Download folder
    path = /home/username/Downloads
    read only = no

If I overwrite files and the file is from different shared folder, but at the same server. It is fine too.
e.g. There is no problem replacing files from dl -> video or video -> dl

However, if I replace file and the source file is from the same shared folder. Caja would show error as shown before. So for example I want to move file from smb://ip-address/video/Test%20folder to smb://ip-address/video/ won't work.

This error doesn't happen when my desktop was still running ubuntu mate 18.04.

anyone can help please?

can you show permissions on /home/username/Videos ?

Hi sorry for the late reply.
This is the folder & files permissions in my server.

$ ls -lah /home/username/Videos/
total 416M
drwxr-xr-x  3 username username 4.0K May 23 12:11 .
drwxrwxrwx 27 username username 4.0K May 23 12:05 ..
drwxrwxr-x  2 username username 4.0K May 23 12:10 old
-rwxr--r--  1 username username  66M Dec 24 21:19 VID_20211224_211901.mp4
-rwxr--r--  1 username username 214M Jan 10 16:09 VID_20220110_160753.mp4
-rwxr--r--  1 username username 137M Jan 10 16:12 VID_20220110_161116.mp4

I want to emphasize that I didn't change anything on the server. When I was still on UM 18.04, I didn't have any problem. The problem only happen on 22.04.

Tried to replicate your env. Created a VM, um22, did all the updates. Installed samba, edited smb.conf with [video] path = /home/user/Videos made /home/user/Videos dir 777. sudo systemctl restart smbd nmbd From a client I try smb://um22/video ... does not work.

I'll keep playing with it ... samba is finicky.

Changed it a bit, instead of /home/user/video, I created /myvideo and changed it to 777. Edited smb.conf, restarted smb and I was able to write in that dir. That tells me that even though /home/username/Videos is 777, /home/username is not. See if you can create dirs outside your /home/username/ and try.

(note: my userid is user, your userid is username)

You said you were able to write, but can you tell me where is the source file from? is it from the client pc? or from samba server?

Also I can write files to samba dir. If the duplicate file is from my desktop and I want to copy this file to my samba server while it already has the same file with the same name. Then It should overwrite the file on the samba server. However, the problem appears when I try to copy file from the samba server itself.

Let's see if I can explain easier by showing the screenshot.
There is 2 files with the same name.

Both same files reside on the same samba server, but on different folder.

Then, I try to copy smb:// to smb://
Caja offers me to skip or replace the file.

When I do select replace. Caja shows error dialog like this. Strangely it says "success", when it isn't.

Yesterday I booted up UM 20.04 live, I could do the above scenario with no problem. So surely there's nothing wrong with the samba server.

I copied files from the client to smb://um22/video I got the same error as your did.

write file to smb://um22/video ... ok
create subfolder video/paul
write file to smb://um22/video/paul ... fail (permissions)

The issue is when samba creates a new folder, the owner is nobody:nogroup with perms 755 hence you cannot write into that folder. A nuclear option is to make Videos and all subdirs 777. Or in the smb.conf you can specify owner, group I forget all the parameters.

I don't have issue creating new folder, the permission and its owner is correct.
This the permission when I create new folder from caja on samba server:

However, I think I forgot to mention I password protected the samba shared folder, I used the same username as UM22.04 username. So I think I don't have any problem with permission, since credential used to access samba is the owner of the /home/username along with its children directories.