Nextcloud folder not visible in Dietpi and Aria2

Ty for your reply.
I added user root to smb.conf as shown above (copy/paste) and restarted both DietPi and Windows (after disconnecting the mount);
When i try to reconnect samba via user root instead of dietpi - windows shows the message “access denied”
User dietpi would work instead.

Edit:
User www-data didn’t work either

Did you set a samba password for root?

I’ve set a password now.
Restarted DietPi and tried to reconnect with Win via samba and user root
(The password for samba is the same as my shh login.)

Somehow it doesn’t work.

hmm this is weird, I havethis config running on two RPis.
Can you show sudo pdbedit -L?

root@DietPi:/# sudo pdbedit -L
dietpi:1000:
root:0:root
root@DietPi:/#


Ok this looks also right.
I have no idea why it isn’t working then.

Don’t mix user created inside NC with user available on operating system level. Both are completely different users and can’t be mixed.

Of course, this will not work as user www-data is not configured inside smb.conf Next to this user should be disabled for direct login if I’m not mistaken.

Can you share your configuration again pls

cat /etc/samba/smb.conf
root@DietPi:/# cat /etc/samba/smb.conf
[global]

        workgroup = WORKGROUP
        server string = %h server
        dns proxy = no
        log file = /var/log/samba/log.%m
        max log size = 1000
        syslog only = no
        syslog = 0

        panic action = /usr/share/samba/panic-action %d

        security = user
        encrypt passwords = true
        passdb backend = tdbsam
        obey pam restrictions = yes
        unix password sync = yes

        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        pam password change = yes
        map to guest = bad user

        load printers = no
        printcap name = /dev/null
        disable spoolss = yes

[dietpi]
        comment = DietPi Share
        path = /mnt/dietpi_userdata
        browseable = yes
        create mask = 0664
        directory mask = 0775
        valid users = dietpi
        writeable = yes
        max connections = 8

[root]
        comment = DietPi Share
        path = /mnt/dietpi_userdata
        browseable = yes
        create mask = 0664
        directory mask = 0775
        valid users = root
        writeable = yes
        max connections = 8
root@DietPi:/#

i edited the

path = /mnt/dietpi_userdata

afterwards - it didnt help

before it was empty path = /
restarted the service inbetween the change

did you set a new samba password for user root?

smbpasswd -a root

yes, i set another password - and did set a new one again its mono so no misspelling could happen.
restarted the service sudo systemctl restart smbd.service
disconnected the drive in Windows and tried to reconnect with user root pws mono
Windows says ‘access denied’ :frowning:

which path you are going to enter in Windows before the user/password window shows up?

the user/pwd window shows up on connecting the share to drive “z:” in windows
I add samba via WinExplorer / Add network drive
then i choose drive “z:” and enter the path \\192.168.99.199\dietpi
then i choose ‘connect with different credentials’ and enter user root pwd mono

this worked for ‘dietpi’ and the main-pwd (Dietpi PWD)

It should be \\192.168.99.199\root now, since you named the section [root].

TY so much!
I thought the path hat to be \\192.168.99.199\dietpi since the software is called dietpi.
the solution was changing the path as mentioned above!

Are you using lighting? (btc)

The name of the path is defined inside the smb.conf. As a coincident name of user matches name of share

Folder name is configured inside square bracket [root] or [dietpi]. There is no direct relation between username and share. You could name the share as you wish.

[/quote]

thank you for your time.
I wish i could donate via lightning

1 Like

hmm we don’t use lightning. Other options are listed on our web site Contribute to DietPi

1 Like

Done, have a nice morning!

Btw: Files dropped in Nextcloud in Windows (user:root via smb) are still not visible in nextcloud on android/apple (user:admin).
Trying to get sudo ncc files:scan --all run in a cronjob every 5 minutes as explained here:
https://dietpi.com/forum/t/is-there-an-dietpi-cronjobs-menu/13342/10

Ah, this is the preceding topic. Let’s keep discussion here now: Cronjob "ncc files:scan --all" not working - #4 by MichaIng