Author Topic: [SOLVED] [samba] Error open file [...] NT_STATUS_ACCESS_DENIED  (Read 7292 times)

G2LOQ

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +1/-0
    • View Profile
Hi,

I've a weird problem with samba. When I'm connected with the VPN (not yet tested on site), I cannot open a file I have just created.  ???

So, I open my personal folder (idem with shared folders), create a new file "test.txt", open it, write a sentence, save it and exit. No problem. Now, when I try to open it again I have a permission problem...

I've activated the log of samba (log level = 3) and in the log:
Code: [Select]
[...] smbd/open.c:424(open_file)
  Error opening file new.txt (NT_STATUS_ACCESS_DENIED) (local_flags=0) (flags=0)
[...] smbd/error.c:60(error_packet_set)
  error packet at smbd/error.c(136) cmd=45 (SMBopenX) NT_STATUS_ACCESS_DENIED

But I can still, rename the file, move it and delete it without any error. I just cannot open it again?!?

I've check the ACL before and after the first edit. No change:
Code: [Select]
# getfacl new.txt
# file: new.txt
# owner: dmoraine
# group: __USERS__
user::rwx
group::r--
other::r--

I've this problem with the PDC enable or not. And the problem is the same using the samba Ubuntu client or with a Windows XP box.

I still need to test this on site without VPN tomorrow.

Any help greatly will be greatly appreciate.
« Last Edit: April 26, 2011, 05:00:05 pm by G2LOQ »

G2LOQ

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +1/-0
    • View Profile
Re: [samba] Error open file [...] NT_STATUS_ACCESS_DENIED
« Reply #1 on: April 26, 2011, 04:59:37 pm »
Solved.

The problem was the same on site. I uninstalled and reinstalled ebox-samba. A reboot later, the problem disappeared.

Very strange...

Ulk_Upp

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: [SOLVED] [samba] Error open file [...] NT_STATUS_ACCESS_DENIED
« Reply #2 on: March 06, 2013, 08:48:38 am »
Thank you G2LOQ,

I had a similar problem with a "guest share". My problem started after a system update, where Samba was updated as well I think. I could write files to the samba share, rename and delete as well, but not read them!? Tried to google the problem without luck, also tried some chmod and chown, no luck. The files had the correct linux permissions and owner "nobody" (even tried with the dreaded chmod -R 777 /path/to/share). When reading files I got "NT_STATUS_ACCESS_DENIED" messages in smbd.log, and "smbd_audit: nobody|192.168.1.XXX|open|fail (Permission denied)|r|TEST_FILE.txt" in syslog. I'm not so good with Linux, yet, and eventually I found this post...

The sollution was uninstall samba4 with:
Code: [Select]
sudo apt-get remove samba4
Then from Zentyal admin interface, install the samba/file sharing module again. All settings were intact, the shares previously configured started working directly without the need for reconfiguration. No reboot needed. Now I can read files from the shares again...