gencache_init: Failed to create directory: /var/www/.cache/samba - Permission denied

Bug #1960754 reported by Andrea Xheli
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Fedora)
Unknown
Unknown
samba (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Getting the following error

gencache_init: Failed to create directory: /var/www/.cache/samba - Permission denied

I seen this was also an issue in redhat

https://bugzilla.redhat.com/show_bug.cgi?id=1908506

Description: Ubuntu 20.04.3 LTS
Release: 20.04

Tags: patch
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for reporting this issue and flagging the related bug report. That report details these steps to reproduce on redhat:

- Steps to Reproduce:
1. Create a share on Windows AD server.
2. Join a system to AD domain via realmd (samba + winbind)
3. Try to access the share hosted on Windows system via smbclient

- Actual results:
'smbclient' command shows an error/warning while accessing the share as non-privileged user e.g. local linux user.
---
gencache_init: Failed to create directory: /home/localuser1/.cache/samba - No such file or directory
---

- Expected results:
'smbclient' command shouldn't throw any error while accessing the share as non-privileged user.

Do these exact steps reproduce the issue for you on Ubuntu 20.04? Did you use the workaround of doing 'mkdir ~/.cache' to resolve things locally, or did you take a different approach?

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
Bryce Harrington (bryce) wrote :

The solution for the bug report you mentioned is the patch I've attached here.

From looking at the focal source for samba, it appears this patch is already included when security provided an update to version 4.13.14, last November.

What version of Samba do you have installed? Does the issue resolve when you update to 2:4.13.17~dfsg-0ubuntu0.21.04.1 or newer?

Changed in samba (Ubuntu):
status: Incomplete → New
status: New → Incomplete
tags: added: patch
Revision history for this message
Andrea Xheli (andyxheli27) wrote :

I did create the temp dir and the solutions fixed the issue.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thank you for the follow up, Andrea. Can you confirm the version of Samba you have installed there? We want to make sure whether this bug is present in the latest Samba version or not. Thanks.

Revision history for this message
Andrea Xheli (andreaxheli) wrote :

Hello i have ^Croot@nextcloud:~apt install smbclient
Reading package lists... Done
Building dependency tree
Reading state information... Done
smbclient is already the newest version (2:4.13.17~dfsg-0ubuntu0.21.04.2).

Revision history for this message
Andrea Xheli (andreaxheli) wrote :

Im sorry for the really late response

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

No problem and thanks for the feedback, Andrea.

Since the bug seems have been fixed in the version currently available, I am marking this bug as Fix Released. Feel free to reopen it if you think the bug is still valid.

Thanks.

Changed in samba (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Andrea Xheli (andreaxheli) wrote :

Would that be version (2:4.13.17~dfsg-0ubuntu0.21.04.2) ? Because I'm still having this issue on version (2:4.13.17~dfsg-0ubuntu0.21.04.2)

description: updated
Revision history for this message
Andrea Xheli (andyxheli27) wrote :

I'm still having this issue on version (2:4.13.17~dfsg-0ubuntu0.21.04.2)

Changed in samba (Ubuntu):
status: Fix Released → Incomplete
Revision history for this message
Paride Legovini (paride) wrote :

Hello Andrea,

I double checked the source code of version 2:4.13.17~dfsg-0ubuntu0.21.04.2 and the directory_create_or_exists_recursive() call in gencache.c is there, so the patch that is reported fixing the redhat bug is applied on the Focal package.

You could be hitting a slightly different case, but in this case to proceed with the investigation we need a set of steps to reproduce the issue from a clean Focal system. Could you please try to identify such steps and share them with us?

As we're waiting for more information I'm leaving this report as Incomplete for now.

Thanks!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.