This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Unable to share folders

Tags: None
(comma "," separated)
coquizen
Registered Member
Posts
2
Karma
0

Unable to share folders

Wed Mar 30, 2022 12:22 pm
Hey folks,

So having a bit of difficulty in getting the Share functionality working. When attempting to share a folder I get prompted

To manage Samba user shares you need to be member of the "sambashare" group.


This is followed by a button to add said user to the group. I would click it, then Dolphin prompts me to restart. I did so.

Upon restart, I checked the Share tab of the folder and the process above repeats again.

I confirmed that I am indeed a member of "sambashare"
Code: Select all
$ groups
sys http i2c sambashare docker rfkill users wheel ian


Can anyone help me resolve this issue?

KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.17.1-arch1-1 (64-bit)
Graphics Platform: X11
samba Version: 4.16.0-2
Dolphin Version: 21.12.3

Just in case, I am including what I think are the contents of the relevant files:

Code: Select all
// Content of smb.conf
[global]
   workgroup = WORKGROUP
   dns proxy = no
   log file = /var/log/samba/%m.log
   max log size = 1000
   client max protocol = SMB2
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
   pam password change = yes
   map to guest = Bad Password
   usershare allow guests = yes
   name resolve order = lmhosts bcast host wins
   security = user
   guest account = nobody
   usershare path = /var/lib/samba/usershare
   usershare max shares = 100
   usershare owner only = yes
   force create mode = 0070
   force directory mode = 0070
   load printers = no
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes
   show add printer wizard = no

[homes]
   comment = Home Directories
   read only = no
   inherit acls = yes
   browseable = no
   create mask = 0700
   directory mask = 0700
   valid users = %S

[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    store dos attributes = Yes
    create mask = 0600
    directory mask = 0700

[users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no


I ran:
Code: Select all
$ testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed

Server role: ROLE_STANDALONE
(..followed by the contents of the file above)


I checked to see that the service is running
Code: Select all
$ systemctl status smb.conf
 smb.service - Samba SMB Daemon
     Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
     Active: active (running) since Wed 2022-03-30 07:52:02 EDT; 14min ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
   Main PID: 1203 (smbd)
     Status: "smbd: ready to serve connections..."
      Tasks: 3 (limit: 19086)
     Memory: 16.9M
        CPU: 56ms
     CGroup: /system.slice/smb.service
             ├─1203 /usr/bin/smbd --foreground --no-process-group --configfile=/etc/samba/smb.conf
             ├─1222 /usr/bin/smbd --foreground --no-process-group --configfile=/etc/samba/smb.conf
             └─1223 /usr/bin/smbd --foreground --no-process-group --configfile=/etc/samba/smb.conf

Mar 30 07:52:02 kronos systemd[1]: Starting Samba SMB Daemon...
Mar 30 07:52:02 kronos smbd[1203]: [2022/03/30 07:52:02.319463,  0] ../../source3/smbd/server.c:1741(main)
Mar 30 07:52:02 kronos smbd[1203]:   smbd version 4.16.0 started.
Mar 30 07:52:02 kronos smbd[1203]:   Copyright Andrew Tridgell and the Samba Team 1992-2022
Mar 30 07:52:02 kronos systemd[1]: Started Samba SMB Daemon.


Directory Content
Code: Select all
/var/lib/samba
Permissions Size User Group      Date Modified Name
.rw-------  422k root root       12 Feb 15:30  account_policy.tdb
drwxrwx---     - root root       31 Jan 11:42  bind-dns
.rw-------   696 root root       12 Feb 15:30  group_mapping.tdb
drwx------     - root root       12 Feb 15:36  private
.rw-------  528k root root       12 Feb 15:30  registry.tdb
.rw-------  422k root root       12 Feb 15:30  share_info.tdb
drwxr-xr-x     - root sambashare 27 Mar 21:24  usershare


However, the content of 'usershare' is empty.

Is there anything I am missing that can help resolve this issue?
coquizen
Registered Member
Posts
2
Karma
0

Re: Unable to share folders  Topic is solved

Wed Mar 30, 2022 10:49 pm
I figured out the problem. Apparently I forgot to set the appropriate permissions for the 'usershare' directory
Code: Select all
# chmod 1770 /var/lib/samba/usershares


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]