You are not logged in.

#1 2012-11-19 08:17:08

coinsyxsamba
Member
Registered: 2012-11-19
Posts: 3

samba server return NT_STATUS_ACCESS_DENIED

This problem definitely drives me crazy!!!

I just install the samba server in a host(a fresh installed Archlinux) and modify the smbd.conf following the guide. Then I use "smbclient" to connect the shared directory from another fedora machine in the same LAN. It can connect to the host successfully but each time I use "ls" to list the content of the shared directory on the host, the server just gives  NT_STATUS_ACCESS_DENIED. I have double checked the config file but cannot find any clue. Here is the smbd.conf

[global]
	workgroup = MYGROUP
	server string = Samba Server
        security = user
       load printers = yes
	log file = /var/log/samba/%m.log
	max log size = 50
	dns proxy = No
	usershare allow guests = Yes
	idmap config * : backend = tdb
[public]
   comment = Public
   path = /home/name/Public
   directory mask = 0777
   create mode = 0777
   browseable = yes
   writable = yes
   guest ok = yes
   printable = no   
   read only = no


The shared directory is located at /home/name/Public and is already chmod to 777.
Both firewalls of the host and visitor machine are shut down.

This is the prompt when I execute smbclient //ip_address/Public

Anonymous login successful
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9]
smb: \> 

And this is the prompt when I use ls to list the content

smb: \> ls
NT_STATUS_ACCESS_DENIED listing \*

I have googled the solution for hours but have not got any luck, so I have to start this new thread here. Does any one can help? Thanks very much.

BTW: I really hate to waste time on such trivial system setting things. However every time I try to install samba, I get wired problems. Really don't like it.

Last edited by coinsyxsamba (2012-11-20 06:07:01)

Offline

#2 2012-11-19 14:53:34

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,403

Re: samba server return NT_STATUS_ACCESS_DENIED

I think the directory mask and the creation mask could be cancelling each other out.
It might be better to just use the guest account. 
You have a path /home/name/Public and you also have //name/Public, I don't know whether your machines name is name.
If you don't really need samba, you might try NFS which is designed for *NIX OS.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2012-11-19 19:00:54

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: samba server return NT_STATUS_ACCESS_DENIED

Is your homedirectory permissions set to allow other users to enter it?
( eXecutive bit should be set on /home/name )


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#4 2012-11-20 06:06:44

coinsyxsamba
Member
Registered: 2012-11-19
Posts: 3

Re: samba server return NT_STATUS_ACCESS_DENIED

The "//name/Public" should be "//ip address/Public". I have add name-ip_addr pair into /etc/hosts in my test machine but forgot mention it here. I have already modified my post.

I have tried 1) comment directory mask = 0777, 2) comment create mode = 0777, 3) comment both of them.  None of them work, I still get NT_STATUS_ACCESS_DENIED.

nomorewindows wrote:

I think the directory mask and the creation mask could be cancelling each other out.
It might be better to just use the guest account. 
You have a path /home/name/Public and you also have //name/Public, I don't know whether your machines name is name.
If you don't really need samba, you might try NFS which is designed for *NIX OS.

Offline

#5 2012-11-20 06:16:22

coinsyxsamba
Member
Registered: 2012-11-19
Posts: 3

Re: samba server return NT_STATUS_ACCESS_DENIED

It works. I chmod 711 to /home/name and now can visited the shared directory from another fedora machine. Thank you very much.

However, when I visited the shared directory from a WIN7 machine(/home/name has 777 mask), I was asked username and password(I don't know what should be type into cause I didn't set any username and password.). I want to visit the shared directory without any password, and I set "guest ok"  and "usershare allow guests" to "yes". But it does not work. Can you help me?

madeye wrote:

Is your homedirectory permissions set to allow other users to enter it?
( eXecutive bit should be set on /home/name )

Last edited by coinsyxsamba (2012-11-20 06:29:13)

Offline

#6 2012-11-20 16:22:27

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,403

Re: samba server return NT_STATUS_ACCESS_DENIED

coinsyxsamba wrote:

It works. I chmod 711 to /home/name and now can visited the shared directory from another fedora machine. Thank you very much.

However, when I visited the shared directory from a WIN7 machine(/home/name has 777 mask), I was asked username and password(I don't know what should be type into cause I didn't set any username and password.). I want to visit the shared directory without any password, and I set "guest ok"  and "usershare allow guests" to "yes". But it does not work. Can you help me?

madeye wrote:

Is your homedirectory permissions set to allow other users to enter it?
( eXecutive bit should be set on /home/name )

I think you still have to enable a guest account with smbpasswd, it relates smbusers with unix users/passwords.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#7 2012-12-01 19:43:57

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: samba server return NT_STATUS_ACCESS_DENIED

I think you need to change the "map to guest" setting. Normally this defaults to never, and will therefore ask for a password when you try to acces the share.
If you however enable the option and set it to

[global]
map to guest = bad password

then you stand a good chance that it will work. (It does on my win7 --> samba server connection )

This setting also makes it possible for guest users to browse the network and see the server. If set to never, you will not be able to see the server on a windows machine without proper login details!

EDIT: Typo wink

Last edited by madeye (2012-12-01 19:46:31)


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#8 2017-03-08 14:35:51

thorsten
Member
From: Germany
Registered: 2010-02-24
Posts: 168

Re: samba server return NT_STATUS_ACCESS_DENIED

I had the same issue on a SUSE-system. It turned out that the restriction was caused by apparmor. So in case your distro shippes apparmor or selinux, the respective configuration has to be updated as well (here, the apparmor configuration was updated on restart, but not on reload)

Offline

#9 2017-03-08 15:21:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: samba server return NT_STATUS_ACCESS_DENIED

Not an Installation issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#10 2017-03-08 16:59:15

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,402
Website

Re: samba server return NT_STATUS_ACCESS_DENIED

Jason, I think you missed that it was a necro. tongue

thorsten, please avoid bumping old topics, particularly when the information is not relevent to Arch.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB