Author Topic: [SOLVED] SAMBA / File Sharing permissions broken  (Read 10713 times)

expertgeeks

  • Forum Moderator
  • Zen Warrior
  • *****
  • Posts: 124
  • Karma: +11/-0
    • View Profile
[SOLVED] SAMBA / File Sharing permissions broken
« on: November 30, 2011, 05:46:04 pm »
Hi All,

I'm having real trouble with Samba Share Authentication, something broke it recently & I'm trying to work out what changed to cause it to break and how to fix the live server...

The server is configured as a PDC/file server (2.2 install, upgraded to core version 2.2.3) and until recently the samba shares were all behaving themselves according to the ACLs I had set for each with Zentyal User Groups. Most shares were restricted to some of the user groups (up to 4 groups per share), and one shared folder was accessible to all (i.e. adding all available user groups to the ACL). No 'guest' enabled shared were created.

After the server has been up for almost a month (and untouched for over a week) I have been contacted by users who are unable to access the network shares they were previously able to. The folder opens & contents are displayed, but accessing any of the files results in "Access denied". This is consistent with XP, and Win 7.

Logging in to the web GUI failed with the same message I have previously discussed.

Code: [Select]
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

As before I deleted as much as I could (deleting logs didn't help, but deleting the backups did free enough space) and was then able to log in to the GUI.

I changed one share to allow guest access, but windows users were still unable to open the files from this guest share. With panic rising steadily I then created a test folder, enabled guest access to it but users were unable to read or write to this either until I chmod'd the folder;

Code: [Select]
sudo chmod -R ugo+rwx /testfolder

only then was a user able to read objects or write to this test folder. Data was then copied into this now unprotected folder so that users could at least access a copy of the data, while this problem is being resolved.

I have tried accessing the samba shares on the server directly using smbclient, with a user that has admin access to the share in question;

Code: [Select]
smbclient -U <Username> //<IP Address>/<Share>
Enter <Username>'s password:
Domain=[Correct Domain Name] OS=[Unix] Server=[Samba 3.4.9]
smb: \>

ls -al successfully listed the contents of the share, however trying to get a file resulted in access denied.

Code: [Select]
smb: \> get "Filename.docx"
NT_STATUS_ACCESS_DENIED opening remote file \Filename.docx

Suggestions are welcome where I go from here.. Thanks!
« Last Edit: December 01, 2011, 09:48:51 pm by expertgeeks »

jjm1982

  • Zen Warrior
  • ***
  • Posts: 200
  • Karma: +7/-0
    • View Profile
Re: SAMBA / File Sharing permissions broken
« Reply #1 on: December 01, 2011, 12:42:09 am »
Did you recently upgrade modules? I updated the samba module last week sometime and ran into the same issue. Changing file permissions and manually restarting the service did nothing. It seemed to have corrected itself after I rebooted the server.

expertgeeks

  • Forum Moderator
  • Zen Warrior
  • *****
  • Posts: 124
  • Karma: +11/-0
    • View Profile
Re: SAMBA / File Sharing permissions broken
« Reply #2 on: December 01, 2011, 10:23:30 am »
Thanks jjm1982, that's the only thing I hadn't tried yet. I cannot physically access the server for another few days so I hadn't wanted to risk breaking things that are working by doing so. So much for being cautious !!

I'll report back when done. Cheers!

expertgeeks

  • Forum Moderator
  • Zen Warrior
  • *****
  • Posts: 124
  • Karma: +11/-0
    • View Profile
Re: SAMBA / File Sharing permissions broken
« Reply #3 on: December 01, 2011, 09:47:49 pm »
OK, I had to wait until all the users were done for the day. I rebooted the box & logged back in to find that the permissions were still screwed (gulp!)..

I changed the permission settings on the folders (i.e. unticked guest access) & saved changes..


PERMISSIONS RESTORED !!! Cue much dancing. \o/


Thanks jjm1982, without your post I'd have waited until I could physically get at the server before rebooting.
« Last Edit: December 01, 2011, 09:50:13 pm by expertgeeks »

jjm1982

  • Zen Warrior
  • ***
  • Posts: 200
  • Karma: +7/-0
    • View Profile
Re: [SOLVED] SAMBA / File Sharing permissions broken
« Reply #4 on: December 03, 2011, 01:43:04 am »
Glad to help!