Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

*nix

*nix forum sponsored by
*nix Forum Sponsored by Navaho

Powering the backend of many of our networks, unbeknown to many. Linux, Solaris, Unix...

Go Back   EduGeek.net Forums > Technical > *nix
Reply
 
LinkBack Thread Tools Search Thread Language
Sponsored Links
Old 01-08-2008, 12:02 PM   #1
 
Geoff's Avatar
 
Join Date: Jun 2005
Location: Fylde, Lancs, UK.
Posts: 9,839
uk uk lancashire
Thanks: 41
Thanked 217 Times in 198 Posts
Blog Entries: 1
Rep Power: 64 Geoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud of
Send a message via ICQ to Geoff Send a message via AIM to Geoff Send a message via MSN to Geoff Send a message via Yahoo to Geoff Send a message via Skype™ to Geoff
Default Samba / Windows ACL mapping problem.

I'm having fun trying to setup my ACLs here so that they do what I want. Currently I'm doing the ACLs for the staff area.

The filesystem has EA/ACL support (it's jfs). The following samba global settings are enabled:

Code:
# Enable ACLs

  inherit permissions = yes
  inherit owner = yes
  map acl inherit = yes
  nt acl support = yes
  ea support = yes
  store dos attributes = yes
The share is setup as follows:

Code:
[staff$]
   comment = Staff Share
   read only = no
   path = /home/staff
   guest ok = no
   hide unreadable = yes
   admin users = @"domain admins", administrator
   hide files = /*quota.*/
   veto files = /*.bat/*.cmd/*.com/*.exe/*.vbs/*.msi/*.pif/*.reg/
   vfs objects = default_quota
I want the following setup:

all_staff has read access /home/staff (and is group owner) and r/w to /home/staff/* (and is group owner)
<username> has r/w to /home/staff/<username> and owns the directory (for quotas)
root,administrator and domain admins have full rights to /home/staff

I concocted the following script to set the permissions:

Code:
cd /home/staff

#*nix permissions
chown administrator:all_staff .
chmod  740 .
ls -l | grep "^d" | awk -F" " '{print "chown -v -R "tolower($9)" "$9}' | sh
ls -l | grep "^d" | awk -F" " '{print "chgrp -v -R all_staff "$9}' | sh
ls -l | grep "^d" | awk -F" " '{print "chmod -v -R 660 "$8}' | sh

#Extended ACLs
setfacl -R -b .
setfacl -R -m u:administrator:rwx .
setfacl -R -m g:"domain admins":rwx .
setfacl -R -m u:root:rwx .
However, when users browse their my documents they cannot see their files. Inspecting the ACLs from Windows reveals that users have no right to delete or directory traversal. What have I missed?
  Reply With Quote
Old 01-08-2008, 12:16 PM   #2
 
Ric_'s Avatar
 
Join Date: Jun 2005
Location: Lancashire
Posts: 5,436
uk uk lancashire
Thanks: 26
Thanked 134 Times in 118 Posts
Rep Power: 40 Ric_ is a splendid one to beholdRic_ is a splendid one to beholdRic_ is a splendid one to beholdRic_ is a splendid one to beholdRic_ is a splendid one to beholdRic_ is a splendid one to behold
Send a message via MSN to Ric_ Send a message via Skype™ to Ric_
Default

Because Windows uses the x bit for directory traversal, don't you need to chmod to 670? I know you mentioned something in the chat about it breaking Samba security mind.

Are you not able to stick full control for an admin on the folder and then alter the permissions from a Windows machine?
  Reply With Quote
Old 01-08-2008, 12:36 PM   #3
 
Geoff's Avatar
 
Join Date: Jun 2005
Location: Fylde, Lancs, UK.
Posts: 9,839
uk uk lancashire
Thanks: 41
Thanked 217 Times in 198 Posts
Blog Entries: 1
Rep Power: 64 Geoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud of
Send a message via ICQ to Geoff Send a message via AIM to Geoff Send a message via MSN to Geoff Send a message via Yahoo to Geoff Send a message via Skype™ to Geoff
Default

Quote:
Originally Posted by Ric_ View Post
Because Windows uses the x bit for directory traversal, don't you need to chmod to 670? I know you mentioned something in the chat about it breaking Samba security mind.
My understanding is that samba maps execute to full control?

Quote:
Are you not able to stick full control for an admin on the folder and then alter the permissions from a Windows machine?
No, any attempt to alter the permissions from the windows side gets me a permission denied error. I have no idea why, as Administrator/Domain Admins are listed as having full control...
  Reply With Quote
Old 01-08-2008, 01:42 PM   #4
 
CyberNerd's Avatar
 
Join Date: Jan 2006
Posts: 3,322
Thanks: 46
Thanked 137 Times in 113 Posts
Rep Power: 36 CyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to behold
Default

Code:
ls -l | grep "^d" | awk -F" " '{print "chmod -v -R 660 "$8}' | sh
660 Denies the user execute permissions on the directory, does this then get inherited? try 770
  Reply With Quote
Old 01-08-2008, 02:05 PM   #5
 
Geoff's Avatar
 
Join Date: Jun 2005
Location: Fylde, Lancs, UK.
Posts: 9,839
uk uk lancashire
Thanks: 41
Thanked 217 Times in 198 Posts
Blog Entries: 1
Rep Power: 64 Geoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud of
Send a message via ICQ to Geoff Send a message via AIM to Geoff Send a message via MSN to Geoff Send a message via Yahoo to Geoff Send a message via Skype™ to Geoff
Default

If I set execute permissions, as I explained above, it means they get full control and can start fiddling with the ACLs.
  Reply With Quote
Old 01-08-2008, 02:14 PM   #6
 
CyberNerd's Avatar
 
Join Date: Jan 2006
Posts: 3,322
Thanks: 46
Thanked 137 Times in 113 Posts
Rep Power: 36 CyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to beholdCyberNerd is a splendid one to behold
Default

I see, I figured the nt mapping was done to an acl, rather than the unix rwx bits.
  Reply With Quote
Old 01-08-2008, 02:44 PM   #7
 
Geoff's Avatar
 
Join Date: Jun 2005
Location: Fylde, Lancs, UK.
Posts: 9,839
uk uk lancashire
Thanks: 41
Thanked 217 Times in 198 Posts
Blog Entries: 1
Rep Power: 64 Geoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud ofGeoff has much to be proud of
Send a message via ICQ to Geoff Send a message via AIM to Geoff Send a message via MSN to Geoff Send a message via Yahoo to Geoff Send a message via Skype™ to Geoff
Default

I'm going to set:

Code:
acl map full control = no
and see if that helps.
  Reply With Quote
Old 02-08-2008, 01:34 PM   #8
 
solemnwarning's Avatar
 
Join Date: Aug 2008
Location: Gosport
Posts: 3
uk
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 solemnwarning is an unknown quantity at this point
Default

The problem with not giving them the exec bit is that under UNIX systems permission to read the contents of a directory is granted by the exec bit for some reason, so no exec permission = can't read dir.
  Reply With Quote
Reply

Register now for FREE and post messages!


Username: Password: Confirm Password: E-Mail: Confirm E-Mail:
Birthday:      
Image Verification
  I agree to forum rules 

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a trust between a Samba DC and a Windows Server 20008 DC ronanian Networks 5 12-06-2008 04:14 PM
joomla acl alonebfg EduGeek Joomla 1.0 Package 1 21-03-2008 05:19 PM
Mapping windows shares %username% equivalent atfnet Mac 5 07-09-2007 11:22 AM
Mapping a windows network drive at login rob101 Mac 4 16-01-2007 09:36 AM
mapping a drive to web folder in windows xp russdev Windows 1 03-10-2005 08:31 AM


Tags
acls, samba


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 05:12 AM.
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Copyright EduGeek.net