Author Topic: [SOLVED]access denied to documents in samba shares  (Read 6781 times)

compay

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
[SOLVED]access denied to documents in samba shares
« on: January 10, 2011, 12:55:35 pm »
Hello,
I am able to create a directory, create a document in it, can edit the document on creation and save it to the directory. But I cannot open it afterwards. I still am able to rename the directory and the document. The behaviour on XP-client and win7-client is the same.
The acl flag is set in /etc/fstab for "/".
Samba-version is: 3.4.9
The access rules for the directory and document look like:
drwxrwxr-x+   <ebox-user-1>   __USERS__
-rwxrwxr---+   <ebox-user-1>   __USERS__
Some more curious findings:
After creation of the document without editing it, I am able to open it again, but after edit, save and open it again, the "access denied" dialog pops up.
Greetings
compay
« Last Edit: January 24, 2011, 05:29:56 pm by compay »

compay

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: access denied to documents in samba shares
« Reply #1 on: January 10, 2011, 04:09:03 pm »
setting to 777 did not help
commenting "full_audit" in /usr/share/ebox/stubs/samba/samba.conf.mas let the samba service fail to start.
The lack of a samba service will knock ebox out :-(
« Last Edit: January 10, 2011, 04:27:26 pm by compay »

cheesyking

  • Zen Warrior
  • ***
  • Posts: 148
  • Karma: +1/-0
    • View Profile
Re: access denied to documents in samba shares
« Reply #2 on: January 10, 2011, 05:42:34 pm »
dumb question but...

you have setup the acls in the share's settings?

Setting the share to 777 should have ruled out unix permissions being a problem which just leaves samba.

BTW IIRC the ACLs that zentyal talks about are samba based and don't have anything to do with file system ACLs in nix itself so you shouldn't need that acl flag in fstab unless you're using it for something else.

don't quote me on that though, I haven't spent much time with zentyal 2 yet.

compay

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: access denied to documents in samba shares
« Reply #3 on: January 10, 2011, 09:56:22 pm »
Thank you for your answer cheesyking,
I have checked "sudo getfacl <path to share>" - that looks OK but do you mean with "the acls in the share's setting" some special settings concerning acl in smb.conf respectively the mas-file?
I will not quote you, but thanks for that hint  - I do not put the acl flag in the fstab, it was already there. It was done either by the install script of the new ebox/Zentyal or the Ubuntu10.04-Server installation.
I've also already set all processes to complain mode in apparmor, which also did not help.
Next attempt will be to deactivate the samba service in eBox and try to run it separately, because most other issues are fixed, solved and are working now.
Even if I mixed something up by chmod 777 in the share created by me, what I cannot deduce, the [homes] should behave OK. But they didn't.
Greetings

adr14n

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +0/-0
    • View Profile
    • Arcom Mexico
Re: access denied to documents in samba shares
« Reply #4 on: January 10, 2011, 11:41:44 pm »
Maybe you can verify file/directory owner. Sometimes they don't corresponding:

Code: [Select]

sudo chown <user>:__USERS__ file/directory


Where user is the owner of samba share.

I hope this helps you

compay

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: access denied to documents in samba shares
« Reply #5 on: January 11, 2011, 01:03:23 am »
Thank you adr14n for your help,
I tried it with no success. The curiosity is: I can create a text document, which can be opened as long as I do not edit it, even several times. After editing and saving it, the access denied message pops up. The access rules on it do not alter. You see no difference with CLI: ls -la or getfacl <path to file>. That's crazy. Tomorrow I will study the log files again.
Greetings Compay

compay

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: access denied to documents in samba shares
« Reply #6 on: January 11, 2011, 10:46:51 am »
Problem solved, thank you cheesyking and adr14n for your help.
After going through the whole system again, I found a new update offered for 2.0.14. That solves this curious problem.
Greetings Compay

casisiempre

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: [SOLVED]access denied to documents in samba shares
« Reply #7 on: February 11, 2011, 11:24:47 pm »
dear compay,
thank you for asking your question - i think i got the same problem.

what do you mean by version 2.0.14?
« Last Edit: February 14, 2011, 07:36:38 pm by casisiempre »

casisiempre

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: [SOLVED]access denied to documents in samba shares
« Reply #8 on: February 15, 2011, 06:56:39 pm »
Everything's now up to date here as well and works now. Muchos gracias.