Access denied when moving file to CIFS volume

In Dolphin, when I cut and paste (move) a file to a locally mounted CIFS share, I get the error “access denied to /mnt/share/filename”.

I then click “cancel”. But… the file HAS actually copied OK. If I navigate to the source folder in Dolphin, the file is still showing but greyed out. Pressing F5 shows the file is no longer there.

Why is this, and what can I do to change it as I presume this error is not correct?

Here is the mount in my fstab:


//windowspc/e$      /mnt/windowspc    cifs   credentials=/etc/win-credentials,file_mode=0777,dir_mode=0777 0  0

Note - I don’t get the error if I copy the file, only if I cut it !

Possibly related to this long-running bug report
https://bugs.kde.org/show_bug.cgi?id=387663
I note that thread contains a number of slightly different corner cases, and even though there have been some problems identified and fixes implemented, a network filesystem issue was reported recently…
https://bugs.kde.org/show_bug.cgi?id=387663#c86

Adding the following to the fstab mount options seems to resolve the issue:

uid="username"

(where username is the local user, without the quote marks)

I am however not entirely sure WHY this is, so any explanations would be very welcome :wink:

From man mount.cifs

uid=arg
sets the uid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a username or a numeric uid. When not specified, the default is uid 0. The mount.cifs helper must be at version 1.10 or higher to support specifying the uid in non-numeric form. See the section on FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS below for more information.

1 Like