[Samba] Occasional "Permission denied" errors when installing R packages onto a share

Ralph Boehme slow at samba.org
Thu Jun 22 10:24:01 UTC 2023

On 6/22/23 11:57, Heckmann, Ilja via samba wrote:
> 1. A subfolder named "00LOCK-${PKG_NAME}/00new/${PKG_NAME}" is created inside
>     the library folder.
> 2. Library binaries are compiled.
> 3. HTML documentation is created.
> 4. The folder "${PKG_NAME}" is moved up two levels.
> 5. The "00LOCK..." folder is removed.
> Step 4 fails reproducibly for some packages, while succeeding for others.

my guess is that the rename fails as the client has some open file 
inside (at any level) the renamed directory. Windows behaviour is to 
prohibit this and Samba follows suit.

With SMB1 you could enable UNIX extensions and that modify Samba 
behaviour to allow the rename, but unfortunately we don't have UNIX 
extensions for SMB2/3 yet.

The first step to analyze this would be getting a network trace and 
taking a look.

If the trace confirms my theory, you could modify can_rename() in 
source3/smbd/smb2_reply.c to disable the rename check, but beware that 
this violates the spec. A good compromise would be to add an option to 
can_rename() that would allow changing behaviour and then set this 
option via an smb.conf include file only for the Linux clients.


Ralph Boehme, Samba Team                 https://samba.org/
SerNet Samba Team Lead      https://sernet.de/en/team-samba
SAMBA+ Samba packages                   https://samba.plus/
SAMBA+ AIX Webinar        https://samba.plus/samba-webinars

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20230622/cfbc3dc8/OpenPGP_signature.sig>

More information about the samba mailing list