0

Samba server is running in centos7, the folder is mounted in windows 10.

I can see all the files and folders, but I can not open any of them, I can not even copy from my sambashare folder to the windows machine.

However I can make new files and folders and they work, and also copy files into sambashare and they appear in centos7 with exactly the same permissions. I tried to clone the permissions from a windows created file with chmod --reference but still I can not access to previously created files.

This is my sambashare config

[global]
    workgroup = WORKGROUP
    security = user

    passdb backend = tdbsam

    printing = cups
    printcap name = cups
    load printers = yes
    cups options = raw

[secure]
    comment = Secure File Server Share
    path =  /home/user
    valid users = user
    guest ok = no
    writable = yes
    browsable = yes
    force user = user
    create mask = 640
    directory mask = 750

1 Answer 1

0

Most likely a SELinux issue. Do a ls -Z on the files that do/don't work, and chcon to set the context so that it is the same.

2
  • Hey, thanks for the answer, I checked and the chcon are different, but I can not change them, I tried sudo chcon -t samba_share_t *, but nothing happens
    – nicetry
    Aug 7, 2020 at 13:37
  • Nice. It works now, I added -R to the command. Thank you a lot!
    – nicetry
    Aug 7, 2020 at 13:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .