[Samba] can't write Samba share as anonymous
Rowland Penny
rpenny at samba.org
Wed Jan 23 16:15:09 UTC 2019
On Wed, 23 Jan 2019 16:56:42 +0100
Andrea Cucciarre' via samba <samba at lists.samba.org> wrote:
> Hello,
>
> I'm trying to access a Samba share as anonymous/guest user, so I have
> added the following entry inf file smb.conf (Samba 4.9)
>
> guest account = andrea
> map to guest = bad user
> ...
> [test]
> available = yes
> browsable = yes
> guest ok = yes
> nfs4: acedup = merge
> nfs4: mode = special
> path = /var/tmp/test
> read only = no
>
> and the shared directory /var/tmp/test has the following permission
> (so user andrea is the owner):
>
> # ls -ld /var/tmp/test/
> drwx------ 5 andrea root 5 Oct 16 11:05 /var/tmp/test/
>
> The client can mount the share as anonymous (user urca doesn't exist)
> but can't read or write:
>
> root at andrea-virtual-machine:~# mount -t cifs //node1/test /mnt2 -o
> username=urca,domain=hyperfile.local
> Password for urca@//node1/test:
>
> root at andrea-virtual-machine:~# cd /mnt2
>
> root at andrea-virtual-machine:/mnt2# df -h .
> Filesystem Size Used Avail Use% Mounted on
> //node1/test 4,2T 2,1T 2,2T 49% /mnt2
>
> root at andrea-virtual-machine:/mnt2# touch pippo
> touch: cannot touch 'pippo': Permission denied
> root at andrea-virtual-machine:/mnt2# ls
> ls: reading directory '.': Permission denied
>
> am I misunderstanding something about Samba anonymous access?
>
Yes ;-)
You are trying to use a known user as a guest user, try reading this:
https://wiki.samba.org/index.php/Setting_up_Samba_as_a_Standalone_Server
Rowland
More information about the samba
mailing list