Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ccache and samba permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jesnow
l33t
l33t


Joined: 26 Apr 2006
Posts: 892

PostPosted: Sun Jan 03, 2021 5:28 pm    Post subject: ccache and samba permissions Reply with quote

Hi everyone:

I have been trying to set up shared ccache between two machines using samba. ccache works just fine locally on the client, but when I mount the ccache directory on the server using samba and point ccache at it I get:

Code:

bartali /home/jesnow # emerge iperf
Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-misc/iperf-3.9-r1::gentoo
 * Adjusting permissions for FEATURES=userpriv: '/var/cache/ccache'


And the emerge hangs, obviously not what we want.

Obviously this is a samba permissions problem and a ccache problem. I can switch the ccache back to local any time, this all works. The authentication with samba works fine, with one catch:

Code:

bartali /home/jesnow # dir /var/cache
total 168
drwxr-xr-x 14 root    root      4096 Jan  3 11:13 .
drwxr-xr-x 10 root    root      4096 Jun 10  2020 ..
drwxr-xr-x  2 root    root      4096 May 31  2020 binpkgs
drwxr-xr-x  2 root    portage      0 Jan  3 11:06 ccache
drwxrwsr-x 19 root    portage   4096 Jan  1 11:07 ccache-local
drwxrwx---  3 root    lp        4096 Dec 28 15:13 cups
drwxrwxr-x  3 root    portage 110592 Jan  3 10:01 distfiles
drwxr-xr-x  4 root    portage   4096 Jan  3 11:09 edb
drwxrwxr-x  2 portage portage   4096 May 31  2020 eix
drwxr-xr-x  2 root    root     12288 Oct 31 18:51 fontconfig
-rw-r--r--  1 root    root         0 Mar 11  2020 .keep
drwx------  2 root    root      4096 Jan  3 11:04 ldconfig
drwxr-xr-x  2 man     man       4096 Mar 11  2020 man
drwx------  2 root    root      4096 May 31  2020 revdep-rebuild
drwxr-xr-x  3 root    root      4096 Jan  3 11:10 samba
bartali /home/jesnow #


When I mount the CCACHE_DIR, samba refuses to mount it group writeable, or setgid. I think these things are required for ccache, and so ccache helpfully sets about fixing them, which it can't. I can do everything else, I have full write access to the remote mounted /var/cache/ccache, I can create and save files there no problem.

the mount command looks like this:

Code:

bartali /home/jesnow # mount -v //merckx/ccache /var/cache/ccache -t cifs -o credentials=/root/smb-merckx/.rcredential,uid=root,gid=portage
mount.cifs kernel mount options: ip=192.168.1.105,unc=\\merckx\ccache,uid=0,gid=250,user=root,pass=********


and smb.conf section on the server looks like this:

Code:

#
[ccache]
        path=/var/cache/ccache
        public=Yes
   writable = Yes
   printable = No
   create mask = 0777
   directory mask = 0777
   force user = root
   force group = portage
        allow hosts = 192.168.1.



But samba on the client steadfastly refuses to grant group writeable and setgid.

Any insight would be greatly appreciated.

Cheers,

Jon.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum