Can someone explain the following behavior. I don't understand windows permissions very well, so I'm not sure if the following is a problem or considered normal. I have a directory called sigmaproj on my samba server; ls -la gives the following information: 14 drwxrwxrwx 31 bkelly users 6656 Sep 17 16:12 sigmaproj in this directory is a file: 2 -rw-r--r-- 1 dvorak users 253 Jul 3 17:57 sigma.log As I understand it, any user should be able to delete the file sigma.log via a samba connection. The Unix file system should allow the file to be deleted because all users have write privileges on the sigmaproj directory. If I understand windows permissions correctly, I believe I should also be able to delete the file after clicking the OK button on a warning dialog box. I find however, that samba users other than bkelly can not delete the file sigma.log. I wanted to verify that windows would allow such a delete, so I set up a similar test in a windows to windows environment. As I suspected, I was able to delete the file after I confirmed my intentions on a dialog box. If windows allows the delete and unix allows the delete, why doesn't samba? Do I have something configured incorrectly? Thanks in advance, Mike Langas
To properly do this test in a Windows environment, you must use a WindowsNT server with NTFS permissions. Set the Share Permissions to Full Control. Set the directory permissions to Full Control. Change the file permissions to Read Only for Everyone and Full Control for that user. With this setup, only that user will be able to delete the file. I suspect your test is not done on an NTFS partition. The behavior you are seeing on Samba is what I would expect. Unfortunately, you cannot change the file permissions from a Windows Box. You must do it on the Unix box for Samba. Hopefully, one day this will be changed... On Fri, 25 Sep 1998, Mike Langas wrote:> Can someone explain the following behavior. I don't understand > windows permissions very well, so I'm not sure if the following is a > problem or considered normal. > > I have a directory called sigmaproj on my samba server; ls -la gives > the following information: > 14 drwxrwxrwx 31 bkelly users 6656 Sep 17 16:12 sigmaproj > > in this directory is a file: > 2 -rw-r--r-- 1 dvorak users 253 Jul 3 17:57 sigma.log > > As I understand it, any user should be able to delete the file sigma.log > > via a samba connection. The Unix file system should allow the file to > be > deleted because all users have write privileges on the sigmaproj > directory. > > If I understand windows permissions correctly, I believe I should also > be > able to delete the file after clicking the OK button on a warning dialog > box. > I find however, that samba users other than bkelly can not delete the > file sigma.log. > > I wanted to verify that windows would allow such a delete, so I set up a > similar test > in a windows to windows environment. As I suspected, I was able to > delete > the file after I confirmed my intentions on a dialog box. > > If windows allows the delete and unix allows the delete, why doesn't > samba? > Do I have something configured incorrectly? > > Thanks in advance, > > Mike Langas > > >=== Tim --------------------------------------------------------------------- | Tim Winders, CNE, MCSE | Email: TWinders@SPC.cc.tx.us | | Network Administrator | Phone: 806-894-9611 x 2369 | | South Plains College | Fax: 806-897-4711 | ---------------------------------------------------------------------
Mike,>I have a directory called sigmaproj on my samba server; ls -la gives >the following information: >14 drwxrwxrwx 31 bkelly users 6656 Sep 17 16:12 sigmaproj > >in this directory is a file: > 2 -rw-r--r-- 1 dvorak users 253 Jul 3 17:57 sigma.log > >As I understand it, any user should be able to delete the file sigma.log >via a samba connection. The Unix file system should allow the file to >be deleted because all users have write privileges on the sigmaproj >directory.100% correct.>If I understand windows permissions correctly, I believe I should also >be able to delete the file after clicking the OK button on a warning dialog >box.Also correct.> I find however, that samba users other than bkelly can not delete the >file sigma.log.Also true. This is because Samba (in an effort to preserve DOS style semantics as much as possible) actually ignores the directory permissions when deleting a file, and treats the 'w' permission as DOS does the 'R' attribute (with the sens reversed of course). So, looking at your file 'sigma.log' above, we can see that users other than bkelly don't have the UNIX 'w' permission, and so the file is deemed (by Samba) to have the DOS 'R' attribute set. (i.e. Samba treats the file as if it's read-only). In recent versions of Samba there is a configuration flag 'delete read only' (or similar) which allows exactly this sort of operation. Mac Assistant Systems Adminstrator @nibsc.ac.uk dmccann@nibsc.ac.uk Work: +44 1707 654753 x285 Everything else: +44 956 237670 (anytime)