Search code examples
linuxpermissionsserversamba

Problems during Samba Server Setup - probably permissions


I'm trying to setup a samba server on my raspberry pi.

I installed samba and made some modifications to smb.conf which I found in various YouTube videos or blog articles.

$ testparm /etc/samba/smb.conf

results to

[global]
   server role = standalone server
   map to guest = Bad User
   obey pam restrictions = Yes
   syslog = 0
   log file = /var/log/samba/log.%m
   max log size = 1000
   dns proxy = No
   idmap config * : backend = tdb

[DATA]
   comment = SHARED_DATA
   path = /media/data
   read only = No
   guest ok = Yes

I created a new user account and also used this username for smbpasswd.

I can find DATA in my network but I can't access it. The reason for this I can't really find out. The error messages I get just say that I am not able to connect.

What I found out. Before mounting the permissions are as follows:

$ ls -l /media/
drwxrwxrwx  2 root root 4096 Dec 28 20:03 data

Then I execute

sudo mount -t auto -o umask=0000,gid=0,uid=0 /dev/sda1 /media/data/

0 maps to root, just to try it out. And with umask everything should be allowed for everybody, right?

But after mounting $ ls -l /media/ results to

drwx------  2 pi   pi   262144 Jan  1  1970 data

pi was the first user on raspberry pi. What confuses me is that the permissions are so strict as well as the owner is not root and the date is set to Jan 1 1970.

Does anybody know what is the problem here and can help me?


Solution

  • Reinstalling everything was the solution for me