Deirdre C. Donovan
2003-Aug-29 18:22 UTC
[Samba] Permissions look different from Windows (cygwin & SAMBA) than from Unix
Hi, folks: One of my developers brought a SAMBA/ClearCase permissions issue to my attention for which I have no visibility. Perhaps someone has run across this before, and could enlighten us? We are using ClearCase 5 on SunFire 880 vob servers, SAMBA 2.2. Developer creates file in unix vob, using unix view, from unix machine, testfile_unix_text Developer creates file in unix vob, using unix view, from windows machine (cygwin & SAMBA), testfile_unix_text The developer's umask is 022 Immediately after creation, from the unix window, the permissions look like this on the view private files. -rw-r--r-- 1 gcote vpgrp 14 Aug 14 14:38 testfile_unix.txt -rw-r--r-- 1 gcote vpgrp 17 Aug 14 15:00 testfile_win.txt Immediately after creation, from the windows machine via SAMBA, the permissions look like this on the view private files. -rw-rw-r-- 1 gcote vpgrp 14 Aug 14 14:38 testfile_unix.txt -rw-rw-r-- 1 gcote vpgrp 17 Aug 14 15:00 testfile_win.txt After checkin, the files look like this from both the unix and windows machines. -rwxrwxrwx 1 gcote vpgrp 0 Aug 14 16:07 testfile_unix.txt testfile_unix.txt@@/main/CHECKEDOUT from /main/1 Rule: CHECKEDOUT SAMBA permissions are: # Global parameters [global] workgroup = LSILOGIC netbios name = nawatvob security = DOMAIN encrypt passwords = Yes # password server = 172.25.8.105 password server = * wins server = 147.145.120.133 kernel oplocks = No oplocks = No level2 oplocks = No # create mask = 0775 # create mask = 0664 create mask = 0774 case sensitive = No preserve case = Yes username map = /usr/local/samba/lib/users.map # this tells Samba to use a separate log file for each machine # that connects log file = /usr/local/samba/var/log.%m # Put a capping on the size of the log files (in Kb). max log size = 50 [vbs] comment = ClearCase VOB Root path = /vbs read only = No directory mask = 0775 directory security mask = 0755 [atria] comment = ClearCase release area path = /proj/atria # create mask = 0755 # create mask = 0664 create mask = 0774 security mask = 0755 directory security mask = 0755 The questions are: 1) Why do the permissions look different from unix and windows? 2) Why do the permissions on the checked out file look like 777 instead of either 664 or 644? 3) Why isn't the SAMBA configuration setting the file permissions to 774? Thanks in advance for any assistance you can provide Deirdre C. Donovan deirdre@deirdre-cassandra.com 415-469-5677 "Don't just do something! Sit there..." - neobuddhist proverb
Jeremy Allison
2003-Aug-29 18:48 UTC
[Samba] Permissions look different from Windows (cygwin & SAMBA) than from Unix
On Fri, Aug 29, 2003 at 06:22:25PM +0000, Deirdre C. Donovan wrote:> Hi, folks: > > One of my developers brought a SAMBA/ClearCase permissions issue to my > attention for which I have no visibility. Perhaps someone has run across > this before, and could enlighten us? > > We are using ClearCase 5 on SunFire 880 vob servers, SAMBA 2.2. > > Developer creates file in unix vob, using unix view, from unix machine, > testfile_unix_text > Developer creates file in unix vob, using unix view, from windows machine > (cygwin & SAMBA), testfile_unix_text > > The developer's umask is 022 > > Immediately after creation, from the unix window, the permissions look like > this on the view private files. > > -rw-r--r-- 1 gcote vpgrp 14 Aug 14 14:38 testfile_unix.txt > -rw-r--r-- 1 gcote vpgrp 17 Aug 14 15:00 testfile_win.txt > > Immediately after creation, from the windows machine via SAMBA, the > permissions look like this on the view private files. > > -rw-rw-r-- 1 gcote vpgrp 14 Aug 14 14:38 testfile_unix.txt > -rw-rw-r-- 1 gcote vpgrp 17 Aug 14 15:00 testfile_win.txtIf you're using Cygwin the algorithm it uses to display permissions is different from the one that Samba uses to calculate permissions. I'm not sure if Cygwin will read the ACLs and create a perms list from there, but Samba is designed to return a perms list for the Windows ACL editor to display, not Cygwin. Cygwin has to read that ACL list and attempt to interpret it whether it comes from a Windows server or Samba server. This probably explains the differences you see here. Jeremy.