I want to run a RPi as NAS with Samba to access my data on the pi over the network, but I don not really get in running properly.
I created /home/shares/Nas-Speicher1 . The smb.conf is adjusted according to a tutorial and links to the /home/shares/Nas-Speicher1
Furthermore, I did more or less the following steps in the terminal:
sudo chown root:nasuser -R /home/shares/NAS-Speicher1
Code: Select all
addgroup nasuser adduser benutzer123 usermod -aG nasuser benutzer123 smbpasswd -a benutzer123 sudo chmod 770 -R /home/shares/NAS-Speicher1 sudo chown root:nasuser -R /home/shares/NAS-Speicher1 service smbd restart
--> for this command it says, that I do not have permissions ("chown: changing ownership of "/home/shares/NAS-Speicher1": Operation not permitted").
If I mount a USB-Stick (FAT) into the directory /home/shares/Nas-Speicher1, then everything works properly. I can create, change, and read data from my Windows-Laptop.
If I mount my 1TB NTFS-external Harddisk, then I see the directorys, but I cannot open files, create new files or anything from windows.
The same, if I have not external drive mounted and try to just create a file on the Pi into the directory /home/shares/NAS-Speicher1.
It always says, that I dont have the permissions.
In the end I just want to plug in the Harddisks, and I want to have a password protection, that not everyone in my network can change or see data on the NAS. On my 1TB HD, there are also quite a lot of data, so I dont want to format it in a Linux format, if I can find another solution.
Can anyone help me, how to fix this permissions-topic?