Score:0

Samba: shared directory is accessible, but shared NTFS drive - not

ar flag

I have Samba server installed on a CentOS 9 Stream machine and I am trying to share an external USB HDD, formatted in NTFS. This is my /etc/fstab record for mounting it:

UUID=880AFE920AAB7B8E /home/smbusr/archive-hdd ntfs-3g defaults,user,uid=1001,gid=1001,umask=022 0 0

The user smbusr have a directory in /home and there is also a samba user existing with the same name, created with smbpasswd -a smbusr. The mounting of the drive is working fine (I installed all the necessary packages).

However, when I try to create a samba share for this drive (/home/smbusr/archive-hdd passed as a path parameter in the /etc/samba/smb.conf) and assign the share to smbusr (valid users parameter), I see it on a remote machine, but cannot access it: I am asked for credentials which are not accepted, no matter if correct or not.

At the same time, I am creating another share, testshare, pointing to /home/smbusr/testshare, again assigned to this user, and when I try to open it, I am asked for credentials, and if entered correctly, I am allowed to browse the directory and edit/delete the files.

These are both records in /etc/samba/smb.conf:

[smbusr-archive]
    comment = archive drive
    path = /home/smbusr/archive-hdd
    read only = No
    valid users = smbusr


[testshare]
    comment = test
    path = /home/smbusr/testshare
    read only = No
    valid users = smbusr

Firewall ports for Samba are open and in SELinux I have:

Allow samba to domain controller
Allow samba to enable home dirs

Also, both /home/smbusr/testshare and /home/smbusr/archive-hdd are owned by smbusr:smbusr.

How am I supposed to share the mounted HDD with permissions for smbusr only, as I did with testshare?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.