Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-29 Thread Jim Gallagher
The Windows clients should be using unicode. Does smbclient use unicode by
default? Could that explain the different behavior between the Windows
clients and smbclient?

On Wed, Aug 29, 2012 at 10:59 AM, Jim Gallagher wrote:

> New info:
>
> I finally realized there are two log files for each client, one with the
> IP address of the client in the file name and the other with the client's
> hostname. I have been looking in the former, when the important info was in
> the latter. It appears that for the unix_mode() call, there are extra
> characters getting appended to the file name. For example, when I try to
> set readonly for a file "test.c", the log entry shows:
>
> [2012/08/29 10:17:29,  3] smbd/dosmode.c:135(unix_mode)
>   unix_mode(test.cî³°) returning 0744
> [2012/08/29 10:17:29,  3] smbd/error.c:56(error_packet_set)
>   error packet at smbd/nttrans.c(541) cmd=162 (SMBntcreateX)
> NT_STATUS_OBJECT_NAME_NOT_FOUND
>
> The characters did not paste correctly; they are not ASCII.
>
> The file is indeed "test.c". Other files appear to get the same characters
> appended for this operation. Wireshark shows the client sends the name as
> "test.c". I can open, edit and save the file without issue.
>
> What about my Windows clients could cause this? Smbclient works fine.
>
> Thanks,
> Jim
>
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-29 Thread Jim Gallagher
New info:

I finally realized there are two log files for each client, one with the IP
address of the client in the file name and the other with the client's
hostname. I have been looking in the former, when the important info was in
the latter. It appears that for the unix_mode() call, there are extra
characters getting appended to the file name. For example, when I try to
set readonly for a file "test.c", the log entry shows:

[2012/08/29 10:17:29,  3] smbd/dosmode.c:135(unix_mode)
  unix_mode(test.cî³°) returning 0744
[2012/08/29 10:17:29,  3] smbd/error.c:56(error_packet_set)
  error packet at smbd/nttrans.c(541) cmd=162 (SMBntcreateX)
NT_STATUS_OBJECT_NAME_NOT_FOUND

The characters did not paste correctly; they are not ASCII.

The file is indeed "test.c". Other files appear to get the same characters
appended for this operation. Wireshark shows the client sends the name as
"test.c". I can open, edit and save the file without issue.

What about my Windows clients could cause this? Smbclient works fine.

Thanks,
Jim

On Sun, Aug 26, 2012 at 4:24 PM, Günter Kukkukk  wrote:

> Am Sonntag, 26. August 2012, 22:46:12 schrieb Jim Gallagher:
> > Günter,
> >
> > I am using the Windows file properties dialog and checking the read only
> > box. I have tested with both Windows 2003 and Windows 7 Enterprise
> clients,
> > with the same results. It seems strange to me that there is no log entry
> on
> > the samba side, but I am not familiar with the log levels.
> >
> > Using wireshark, I definitely see traffic after selecting OK from the
> > dialog when attempting to set RO, but I don't know enough about the
> > protocol to decipher what's going on.
> >
> > Thanks,
> > Jim
> >
> > On Sun, Aug 26, 2012 at 9:34 AM, Günter Kukkukk 
> wrote:
> > > Hi Jim,
> > >
> > > in your smbd debug log i don't see any call where the dos
> > > attributes are modified.
> > > From what kind of client are you connecting and which commands
> > > do you use to change the readonly/readwrite dos attribute ?
> > >
> > > As Jeremy already posted, with smblient you can use
> > >
> > >   setmode  +r (or -r)
> > >
> > > Inside a windows MSDOS cmdline window you can use
> > >
> > >   attrib *(to list the current attributes)
> > >   attrib +r somefile  (to set that file read only)
> > >   attrib -r somefile  (to set that file read/write)
> > >
> > > Also the windows GUI file explorer can be used.
> > >
> > > With samba "log level = 4" here i get the following logged:
> > >
> > > a.) Setting read/write for file "test.fil":
> > > [2012/08/26 17:40:11.977248,  3] smbd/dosmode.c:160(unix_mode)
> > >
> > >   unix_mode(test.fil) returning 0644
> > >
> > > [2012/08/26 17:40:11.977857,  3] smbd/reply.c:1390(reply_setatr)
> > >
> > >   setatr name=test.fil mode=0
> > >
> > > Result on the unix side:
> > >   -rw-r--r-- 1 gk users 1 Aug 12  2011 test.fil
> > >
> > > --
> > >
> > > b.) Setting read only for file "test.fil":
> > > [2012/08/26 17:41:23.200130,  3] smbd/dosmode.c:160(unix_mode)
> > >
> > >   unix_mode(test.fil) returning 0444
> > >
> > > [2012/08/26 17:41:23.201050,  3] smbd/reply.c:1390(reply_setatr)
> > >
> > >   setatr name=test.fil mode=1
> > >
> > > Result on the unix side:
> > >  -r--r--r-- 1 gk users 1 Aug 12  2011 test.fil
> > >
> > > -
> > >
> > > Cheers, Günter
>
> when you change a dos attribute, within wireshark you should see
>   Set Information Request, Path:\yourfile
>   Set Information Response
> packet pairs on the wire.
> The passed "File Attributes" can be also viewed.
>
> Haven't tried windows7 here, whether it uses a different approach.
>
> Can you try on your server itself:
> smbclient //localhost/test -U jim
> ... pw entry
> smb: \> setmode yourfile +r
> smb: \> setmode yourfile -r
>
> Cheers, Günter
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-27 Thread Günter Kukkukk
Am Montag, 27. August 2012, 07:08:14 schrieb Jim Gallagher:
> OK, this is getting interesting. When I use smbclient, flipping the RO
> attrib flips sets the unix permissions as expected.
> 
> Here is the basic wireshark trace. This capture below is between the samba
> server and the Windows 2003 client. The capture starts after I have the
> file properties dialog up, but before I set RO and select "OK".
> 
> No. TimeSourceDestination   Protocol
> Info
>   1 0.00  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>   2 0.001328  SMB  Trans2
> Response, QUERY_PATH_INFO
>   3 0.001586  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>   4 0.002703  SMB  Trans2
> Response, QUERY_PATH_INFO
>   5 0.002824  SMB  Trans2
> Request, QUERY_FS_INFO, Query FS Volume Info
>   6 0.003585  SMB  Trans2
> Response, QUERY_FS_INFO
>   7 0.003674  SMB  Trans2
> Request, QUERY_FS_INFO, Query FS Attribute Info
>   8 0.004379  SMB  Trans2
> Response, QUERY_FS_INFO
>   9 0.004538  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  10 0.005512  SMB  Trans2
> Response, QUERY_PATH_INFO
>  11 0.005701  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  12 0.006656  SMB  Trans2
> Response, QUERY_PATH_INFO
>  13 0.006747  SMB  Trans2
> Request, QUERY_FS_INFO, Query FS Attribute Info
>  14 0.007461  SMB  Trans2
> Response, QUERY_FS_INFO
>  15 0.008554  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  16 0.009607  SMB  Trans2
> Response, QUERY_PATH_INFO
>  17 0.009771  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  18 0.010686  SMB  Trans2
> Response, QUERY_PATH_INFO
>  19 0.010811  SMB  Trans2
> Request, QUERY_FS_INFO, Query FS Volume Info
>  20 0.011535  SMB  Trans2
> Response, QUERY_FS_INFO
>  21 0.011614  SMB  Trans2
> Request, QUERY_FS_INFO, Query FS Attribute Info
>  22 0.012330  SMB  Trans2
> Response, QUERY_FS_INFO
>  23 0.012480  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  24 0.013417  SMB  Trans2
> Response, QUERY_PATH_INFO
>  25 0.013582  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  26 0.014480  SMB  Trans2
> Response, QUERY_PATH_INFO
>  27 0.014879  SMB  Trans2
> Request, QUERY_FS_INFO, Query FS Attribute Info
>  28 0.030232  SMB  Trans2
> Response, QUERY_FS_INFO
>  29 0.070392  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  30 0.071543  SMB  Trans2
> Response, QUERY_PATH_INFO
>  31 0.071681  SMB  Trans2
> Request, QUERY_FS_INFO, Query Full FS Size Info
>  32 0.072603  SMB  Trans2
> Response, QUERY_FS_INFO
>  33 0.073288  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  34 0.074264  SMB  Trans2
> Response, QUERY_PATH_INFO
>  35 0.074354  SMB  Trans2
> Request, QUERY_FS_INFO, Query Full FS Size Info
>  36 0.075160  SMB  Trans2
> Response, QUERY_FS_INFO
>  37 0.076763  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  38 0.077791  SMB  Trans2
> Response, QUERY_PATH_INFO
>  39 0.077905  SMB  Trans2
> Request, QUERY_FS_INFO, Query Full FS Size Info
>  40 0.088850  SMB  Trans2
> Response, QUERY_FS_INFO
>  41 0.093045  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path:
>  42 0.097632  SMB  Trans2
> Response, QUERY_PATH_INFO
>  43 0.097814  SMB  Trans2
> Request, QUERY_FS_INFO, Query Full FS Size Info
>  44 0.098672  SMB  Trans2
> Response, QUERY_FS_INFO
>  45 0.233616  TCP
> ls3bcast > microsoft-ds [ACK] Seq=1701 Ack=2123 Win=63756 Len=0
>  46 2.635716  SMB  Trans2
> Request, QUERY_PATH_INFO, Query File Basic Info, Path: \test.c
>  47 2.636974

Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-26 Thread Jim Gallagher
OK, this is getting interesting. When I use smbclient, flipping the RO
attrib flips sets the unix permissions as expected.

Here is the basic wireshark trace. This capture below is between the samba
server and the Windows 2003 client. The capture starts after I have the
file properties dialog up, but before I set RO and select "OK".

No. TimeSourceDestination   Protocol
Info
  1 0.00  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
  2 0.001328  SMB  Trans2
Response, QUERY_PATH_INFO
  3 0.001586  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
  4 0.002703  SMB  Trans2
Response, QUERY_PATH_INFO
  5 0.002824  SMB  Trans2
Request, QUERY_FS_INFO, Query FS Volume Info
  6 0.003585  SMB  Trans2
Response, QUERY_FS_INFO
  7 0.003674  SMB  Trans2
Request, QUERY_FS_INFO, Query FS Attribute Info
  8 0.004379  SMB  Trans2
Response, QUERY_FS_INFO
  9 0.004538  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 10 0.005512  SMB  Trans2
Response, QUERY_PATH_INFO
 11 0.005701  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 12 0.006656  SMB  Trans2
Response, QUERY_PATH_INFO
 13 0.006747  SMB  Trans2
Request, QUERY_FS_INFO, Query FS Attribute Info
 14 0.007461  SMB  Trans2
Response, QUERY_FS_INFO
 15 0.008554  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 16 0.009607  SMB  Trans2
Response, QUERY_PATH_INFO
 17 0.009771  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 18 0.010686  SMB  Trans2
Response, QUERY_PATH_INFO
 19 0.010811  SMB  Trans2
Request, QUERY_FS_INFO, Query FS Volume Info
 20 0.011535  SMB  Trans2
Response, QUERY_FS_INFO
 21 0.011614  SMB  Trans2
Request, QUERY_FS_INFO, Query FS Attribute Info
 22 0.012330  SMB  Trans2
Response, QUERY_FS_INFO
 23 0.012480  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 24 0.013417  SMB  Trans2
Response, QUERY_PATH_INFO
 25 0.013582  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 26 0.014480  SMB  Trans2
Response, QUERY_PATH_INFO
 27 0.014879  SMB  Trans2
Request, QUERY_FS_INFO, Query FS Attribute Info
 28 0.030232  SMB  Trans2
Response, QUERY_FS_INFO
 29 0.070392  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 30 0.071543  SMB  Trans2
Response, QUERY_PATH_INFO
 31 0.071681  SMB  Trans2
Request, QUERY_FS_INFO, Query Full FS Size Info
 32 0.072603  SMB  Trans2
Response, QUERY_FS_INFO
 33 0.073288  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 34 0.074264  SMB  Trans2
Response, QUERY_PATH_INFO
 35 0.074354  SMB  Trans2
Request, QUERY_FS_INFO, Query Full FS Size Info
 36 0.075160  SMB  Trans2
Response, QUERY_FS_INFO
 37 0.076763  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 38 0.077791  SMB  Trans2
Response, QUERY_PATH_INFO
 39 0.077905  SMB  Trans2
Request, QUERY_FS_INFO, Query Full FS Size Info
 40 0.088850  SMB  Trans2
Response, QUERY_FS_INFO
 41 0.093045  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path:
 42 0.097632  SMB  Trans2
Response, QUERY_PATH_INFO
 43 0.097814  SMB  Trans2
Request, QUERY_FS_INFO, Query Full FS Size Info
 44 0.098672  SMB  Trans2
Response, QUERY_FS_INFO
 45 0.233616  TCP
ls3bcast > microsoft-ds [ACK] Seq=1701 Ack=2123 Win=63756 Len=0
 46 2.635716  SMB  Trans2
Request, QUERY_PATH_INFO, Query File Basic Info, Path: \test.c
 47 2.636974  SMB  Trans2
Response, QUERY_PATH_INFO
 48 2.637319  SMB  NT
Create AndX Request, FID: 0x2c3d, Path: \test.c
 49 2.638538  SMB  NT
Create AndX Response, FID: 0x2c3d
 50 2.638638  

Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-26 Thread Günter Kukkukk
Am Sonntag, 26. August 2012, 22:46:12 schrieb Jim Gallagher:
> Günter,
> 
> I am using the Windows file properties dialog and checking the read only
> box. I have tested with both Windows 2003 and Windows 7 Enterprise clients,
> with the same results. It seems strange to me that there is no log entry on
> the samba side, but I am not familiar with the log levels.
> 
> Using wireshark, I definitely see traffic after selecting OK from the
> dialog when attempting to set RO, but I don't know enough about the
> protocol to decipher what's going on.
> 
> Thanks,
> Jim
> 
> On Sun, Aug 26, 2012 at 9:34 AM, Günter Kukkukk  wrote:
> > Hi Jim,
> > 
> > in your smbd debug log i don't see any call where the dos
> > attributes are modified.
> > From what kind of client are you connecting and which commands
> > do you use to change the readonly/readwrite dos attribute ?
> > 
> > As Jeremy already posted, with smblient you can use
> > 
> >   setmode  +r (or -r)
> > 
> > Inside a windows MSDOS cmdline window you can use
> > 
> >   attrib *(to list the current attributes)
> >   attrib +r somefile  (to set that file read only)
> >   attrib -r somefile  (to set that file read/write)
> > 
> > Also the windows GUI file explorer can be used.
> > 
> > With samba "log level = 4" here i get the following logged:
> > 
> > a.) Setting read/write for file "test.fil":
> > [2012/08/26 17:40:11.977248,  3] smbd/dosmode.c:160(unix_mode)
> > 
> >   unix_mode(test.fil) returning 0644
> > 
> > [2012/08/26 17:40:11.977857,  3] smbd/reply.c:1390(reply_setatr)
> > 
> >   setatr name=test.fil mode=0
> > 
> > Result on the unix side:
> >   -rw-r--r-- 1 gk users 1 Aug 12  2011 test.fil
> > 
> > --
> > 
> > b.) Setting read only for file "test.fil":
> > [2012/08/26 17:41:23.200130,  3] smbd/dosmode.c:160(unix_mode)
> > 
> >   unix_mode(test.fil) returning 0444
> > 
> > [2012/08/26 17:41:23.201050,  3] smbd/reply.c:1390(reply_setatr)
> > 
> >   setatr name=test.fil mode=1
> > 
> > Result on the unix side:
> >  -r--r--r-- 1 gk users 1 Aug 12  2011 test.fil
> > 
> > -
> > 
> > Cheers, Günter

when you change a dos attribute, within wireshark you should see
  Set Information Request, Path:\yourfile
  Set Information Response
packet pairs on the wire.
The passed "File Attributes" can be also viewed.

Haven't tried windows7 here, whether it uses a different approach.

Can you try on your server itself:
smbclient //localhost/test -U jim
... pw entry
smb: \> setmode yourfile +r
smb: \> setmode yourfile -r

Cheers, Günter
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-26 Thread Jim Gallagher
Günter,

I am using the Windows file properties dialog and checking the read only
box. I have tested with both Windows 2003 and Windows 7 Enterprise clients,
with the same results. It seems strange to me that there is no log entry on
the samba side, but I am not familiar with the log levels.

Using wireshark, I definitely see traffic after selecting OK from the
dialog when attempting to set RO, but I don't know enough about the
protocol to decipher what's going on.

Thanks,
Jim



On Sun, Aug 26, 2012 at 9:34 AM, Günter Kukkukk  wrote:

>
> Hi Jim,
>
> in your smbd debug log i don't see any call where the dos
> attributes are modified.
> From what kind of client are you connecting and which commands
> do you use to change the readonly/readwrite dos attribute ?
>
> As Jeremy already posted, with smblient you can use
>   setmode  +r (or -r)
> Inside a windows MSDOS cmdline window you can use
>   attrib *(to list the current attributes)
>   attrib +r somefile  (to set that file read only)
>   attrib -r somefile  (to set that file read/write)
> Also the windows GUI file explorer can be used.
>
> With samba "log level = 4" here i get the following logged:
>
> a.) Setting read/write for file "test.fil":
> [2012/08/26 17:40:11.977248,  3] smbd/dosmode.c:160(unix_mode)
>   unix_mode(test.fil) returning 0644
> [2012/08/26 17:40:11.977857,  3] smbd/reply.c:1390(reply_setatr)
>   setatr name=test.fil mode=0
>
> Result on the unix side:
>   -rw-r--r-- 1 gk users 1 Aug 12  2011 test.fil
> --
>
> b.) Setting read only for file "test.fil":
> [2012/08/26 17:41:23.200130,  3] smbd/dosmode.c:160(unix_mode)
>   unix_mode(test.fil) returning 0444
> [2012/08/26 17:41:23.201050,  3] smbd/reply.c:1390(reply_setatr)
>   setatr name=test.fil mode=1
>
> Result on the unix side:
>  -r--r--r-- 1 gk users 1 Aug 12  2011 test.fil
> -
>
> Cheers, Günter
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-26 Thread Günter Kukkukk
Am Freitag, 24. August 2012, 23:40:42 schrieb Jim Gallagher:
> All,
> 
> Sorry for not following up. Crazy week.
> 
> Anyway, the "username" parameter should have been "valid users". I just
> took it out, since my test share is not browseable. I also upped log level
> to 4. I do not get any log entry at all when trying to set the DOS RO
> attribute, and the unix permissions do not get changed. The log for my test
> session is below.
> 
> Thanks,
> Jim
> 
> 
> 
> 
> [2012/08/24 14:12:09,  3] param/loadparm.c:5982(lp_load_ex)
>   lp_load_ex: refreshing parameters
> Initialising global parameters
> [2012/08/24 14:12:09,  3] ../lib/util/params.c:550(pm_process)
>   params.c:pm_process() - Processing configuration file
> "/etc/opt/samba/sgpkg1/sgpkg1.conf"
> [2012/08/24 14:12:09,  3] param/loadparm.c:4658(do_section)
>   Processing section "[global]"
>   doing parameter lock directory = /var/opt/samba/sgpkg1/locks
>   doing parameter private dir = /var/opt/samba/sgpkg1/private
>   doing parameter pid directory = /var/opt/samba/sgpkg1/locks
>   doing parameter state directory = /var/opt/samba/sgpkg1/locks
>   doing parameter cache directory = /var/opt/samba/sgpkg1/locks
>   doing parameter include = /etc/opt/samba/sgpkg1/sgpkg1.conf.%m
> [2012/08/24 14:12:09,  2] param/loadparm.c:4112(handle_include)
>   Can't find include file /etc/opt/samba/sgpkg1/sgpkg1.conf.clientip
>   doing parameter socket address = serverip
>   doing parameter interfaces = serverip
>   doing parameter bind interfaces only = yes
>   doing parameter max log size = 1000
>   doing parameter username map = /etc/opt/samba/sgpkg1/smbusers.map
>   doing parameter security = domain
>   doing parameter local master = no
>   doing parameter password server = 
>   doing parameter wins server = 
>   doing parameter dns proxy = yes
>   doing parameter encrypt passwords = yes
>   doing parameter smb passwd file = /var/opt/samba/sgpkg1/private/smbpasswd
>   doing parameter preserve case = yes
>   doing parameter short preserve case = yes
>   doing parameter dos filetime resolution = yes
>   doing parameter read only = no
>   doing parameter syslog = 0
>   doing parameter kernel oplocks = no
>   doing parameter oplocks = no
>   doing parameter level2 oplocks = no
>   doing parameter guest account = smbguest
>   doing parameter use mmap = no
>   doing parameter unix extensions = no
> [2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
>   Processing section "[vob_storage]"
>   doing parameter path = /vob_storage
>   doing parameter create mask = 0775
>   doing parameter directory mask = 0775
>   doing parameter oplocks = no
>   doing parameter force group = group1
>   doing parameter map archive = no
>   doing parameter map hidden = no
> [2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
>   Processing section "[view_storage]"
>   doing parameter path = /view_storage
>   doing parameter create mask = 0775
>   doing parameter directory mask = 0775
>   doing parameter oplocks = no
>   doing parameter force group = group1
>   doing parameter map archive = no
>   doing parameter map hidden = no
> [2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
>   Processing section "[build_storage]"
>   doing parameter path = /build_storage
>   doing parameter create mask = 0775
>   doing parameter directory mask = 0775
>   doing parameter oplocks = no
>   doing parameter force group = group1
>   doing parameter map archive = no
>   doing parameter map hidden = no
> [2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
>   Processing section "[developer_views]"
>   doing parameter path = /developer_views
>   doing parameter create mask = 0775
>   doing parameter directory mask = 0775
>   doing parameter oplocks = no
>   doing parameter force group = group1
>   doing parameter map archive = no
>   doing parameter map hidden = no
> [2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
>   Processing section "[proj1data01]"
>   doing parameter path = /proj1data01
>   doing parameter create mask = 0775
>   doing parameter directory mask = 0775
>   doing parameter oplocks = no
>   doing parameter map archive = no
>   doing parameter map hidden = no
> [2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
>   Processing section "[proj1lib]"
>   doing parameter path = /proj1lib
>   doing parameter create mask = 0775
>   doing parameter directory mask = 0775
>   doing parameter oplocks = no
>   doing parameter map archive = no
>   doing parameter map hidden = no
> [2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
>   Processing section "[Test]"
>   doing parameter comment = Setup to test dos RO attribute
>   doing parameter browseable = No
>   doing parameter path = /home/jim
>   doing parameter writeable = yes
>   doing parameter ea support = no
>   doing parameter store dos attributes = no
>   doing parameter map readonly = yes
>   doing parameter dos filemode = yes
> [2012/08/24 14:12:09,  4] param/loadparm.c:6017(lp_load_ex

Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-24 Thread Jim Gallagher
All,

Sorry for not following up. Crazy week.

Anyway, the "username" parameter should have been "valid users". I just
took it out, since my test share is not browseable. I also upped log level
to 4. I do not get any log entry at all when trying to set the DOS RO
attribute, and the unix permissions do not get changed. The log for my test
session is below.

Thanks,
Jim




[2012/08/24 14:12:09,  3] param/loadparm.c:5982(lp_load_ex)
  lp_load_ex: refreshing parameters
Initialising global parameters
[2012/08/24 14:12:09,  3] ../lib/util/params.c:550(pm_process)
  params.c:pm_process() - Processing configuration file
"/etc/opt/samba/sgpkg1/sgpkg1.conf"
[2012/08/24 14:12:09,  3] param/loadparm.c:4658(do_section)
  Processing section "[global]"
  doing parameter lock directory = /var/opt/samba/sgpkg1/locks
  doing parameter private dir = /var/opt/samba/sgpkg1/private
  doing parameter pid directory = /var/opt/samba/sgpkg1/locks
  doing parameter state directory = /var/opt/samba/sgpkg1/locks
  doing parameter cache directory = /var/opt/samba/sgpkg1/locks
  doing parameter include = /etc/opt/samba/sgpkg1/sgpkg1.conf.%m
[2012/08/24 14:12:09,  2] param/loadparm.c:4112(handle_include)
  Can't find include file /etc/opt/samba/sgpkg1/sgpkg1.conf.clientip
  doing parameter socket address = serverip
  doing parameter interfaces = serverip
  doing parameter bind interfaces only = yes
  doing parameter max log size = 1000
  doing parameter username map = /etc/opt/samba/sgpkg1/smbusers.map
  doing parameter security = domain
  doing parameter local master = no
  doing parameter password server = 
  doing parameter wins server = 
  doing parameter dns proxy = yes
  doing parameter encrypt passwords = yes
  doing parameter smb passwd file = /var/opt/samba/sgpkg1/private/smbpasswd
  doing parameter preserve case = yes
  doing parameter short preserve case = yes
  doing parameter dos filetime resolution = yes
  doing parameter read only = no
  doing parameter syslog = 0
  doing parameter kernel oplocks = no
  doing parameter oplocks = no
  doing parameter level2 oplocks = no
  doing parameter guest account = smbguest
  doing parameter use mmap = no
  doing parameter unix extensions = no
[2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
  Processing section "[vob_storage]"
  doing parameter path = /vob_storage
  doing parameter create mask = 0775
  doing parameter directory mask = 0775
  doing parameter oplocks = no
  doing parameter force group = group1
  doing parameter map archive = no
  doing parameter map hidden = no
[2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
  Processing section "[view_storage]"
  doing parameter path = /view_storage
  doing parameter create mask = 0775
  doing parameter directory mask = 0775
  doing parameter oplocks = no
  doing parameter force group = group1
  doing parameter map archive = no
  doing parameter map hidden = no
[2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
  Processing section "[build_storage]"
  doing parameter path = /build_storage
  doing parameter create mask = 0775
  doing parameter directory mask = 0775
  doing parameter oplocks = no
  doing parameter force group = group1
  doing parameter map archive = no
  doing parameter map hidden = no
[2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
  Processing section "[developer_views]"
  doing parameter path = /developer_views
  doing parameter create mask = 0775
  doing parameter directory mask = 0775
  doing parameter oplocks = no
  doing parameter force group = group1
  doing parameter map archive = no
  doing parameter map hidden = no
[2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
  Processing section "[proj1data01]"
  doing parameter path = /proj1data01
  doing parameter create mask = 0775
  doing parameter directory mask = 0775
  doing parameter oplocks = no
  doing parameter map archive = no
  doing parameter map hidden = no
[2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
  Processing section "[proj1lib]"
  doing parameter path = /proj1lib
  doing parameter create mask = 0775
  doing parameter directory mask = 0775
  doing parameter oplocks = no
  doing parameter map archive = no
  doing parameter map hidden = no
[2012/08/24 14:12:09,  2] param/loadparm.c:4675(do_section)
  Processing section "[Test]"
  doing parameter comment = Setup to test dos RO attribute
  doing parameter browseable = No
  doing parameter path = /home/jim
  doing parameter writeable = yes
  doing parameter ea support = no
  doing parameter store dos attributes = no
  doing parameter map readonly = yes
  doing parameter dos filemode = yes
[2012/08/24 14:12:09,  4] param/loadparm.c:6017(lp_load_ex)
  pm_process() returned Yes
[2012/08/24 14:12:09,  3] param/loadparm.c:3119(lp_add_ipc)
  adding IPC service
[2012/08/24 14:12:09,  3] printing/pcap.c:136(pcap_cache_reload)
  reloading printcap cache
[2012/08/24 14:12:09,  3] printing/print_svid.c:66(sysv_cache_reload)
  Scheduler is not runni

Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-17 Thread Günter Kukkukk
Am Samstag, 18. August 2012, 00:38:09 schrieb Jim Gallagher:
> I added "dos filemode = yes", but it still does not work. Rats...

what kind of clients are you using?
I'm wondering why you use
   "username = jim"

With latest samba git tree I just tried legacy OS/2 and also
the OS/2 DOS Window - in both all works as expected.

I'm only using:
   ea support = no
   store dos attributes = no
   map readonly = yes

You are using "log level = 3", so you should see
   "unix_mode() returning 0xxx" 
lines in your smbd debug logfile.

What do you get there?

Cheers, Günter
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-17 Thread Jim Gallagher
I added "dos filemode = yes", but it still does not work. Rats...
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-17 Thread Jeremy Allison
On Fri, Aug 17, 2012 at 02:06:22PM -0700, Jim Gallagher wrote:
> Jeremy,
> 
> Thanks for the reply! Unfortunately, it did not work. Here is the global
> section from smb.conf and the section for the share that I tested with:

Hmmm. I just tested with top-of-tree 3.6.x and the settings:

store dos attributes = no
dos filemode = yes
map readonly = yes

and using smbclient "setmode" command I can toggle
the user "w" bit on the server by doing :

smb: \> setmode filename +r
smb: \> setmode filename -r

Jeremy.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-17 Thread Jim Gallagher
Jeremy,

Thanks for the reply! Unfortunately, it did not work. Here is the global
section from smb.conf and the section for the share that I tested with:

[global]
   workgroup = AD
   realm = COMPANY.COM
   netbios name = server01
   server string = server01 Samba Server
   log file = /var/opt/samba/server01/log.%m
   log level = 3
   lock directory = /var/opt/samba/server01/locks
   private dir = /var/opt/samba/server01/private
   pid directory = /var/opt/samba/server01/locks
   state directory = /var/opt/samba/server01/locks
   cache directory = /var/opt/samba/server01/locks
   #root directory = /nothing
   include = /etc/opt/samba/server01/server01.conf.%m
   socket address = 
   interfaces = 
   bind interfaces only = yes
   max log size = 1000
  username map = /etc/opt/samba/server01/smbusers.map
# Security mode. Use 'ads' for configuring with W2K domain and
# use Kerberos as authentication protocol.
   security = domain
   local master = no
   #password server = *
   password server = 
   wins server = 
   dns proxy = yes
   encrypt passwords = yes
   smb passwd file = /var/opt/samba/server01/private/smbpasswd
   preserve case = yes
   short preserve case = yes
   dos filetime resolution = yes
   read only = no
   syslog = 0
   kernel oplocks = no
   oplocks = no
   level2 oplocks = no
guest account = smbguest
# mmap =no is necessary to prevent a smbd crash
use mmap = no
unix extensions = no

[Test]
   comment = Setup to test dos RO attribute
   browseable = No
   path = /home/jim
   writeable = yes
   username = jim
   ea support = no
   store dos attributes = no
   map readonly = yes


All help appreciated!

Thanks,
Jim
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-16 Thread Jeremy Allison
On Thu, Aug 16, 2012 at 11:48:00PM +0100, Jonathan Buzzard wrote:
> Jim Gallagher wrote:
> >Hi,
> >
> >Is there an easy way to get Samba v3.4.3 to respond to client requests to
> >change the read-only attribute by setting/unsetting the unix write bits?
> >For the shares in question, the unix permissions are not really important,
> >but managing the RO attribute is. It appears that this was the default
> >behavior in (very?) old Samba versions, but my server appears to simply
> >ignore RO attribute change requests.
> 
> There is, you need the following and your file system mounted with
> extended attributes enabled
> 
> # store DOS attributes in extended attributes
>   ea support = yes
>   store dos attributes = yes
>   map readonly = no
>   map archive = no
>   map system = no
>   map hidden = no

No - that's the wrong way around ! In order to get Samba
to change the UNIX perms when DOS attributes change, you
need to set:

   ea support = no
   store dos attributes = no
   map readonly = yes

Then it should map the readonly bit into the user "w"
bit.

Jeremy
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Samba 3.4.3 and DOS read only

2012-08-16 Thread Jonathan Buzzard

Jim Gallagher wrote:

Hi,

Is there an easy way to get Samba v3.4.3 to respond to client requests to
change the read-only attribute by setting/unsetting the unix write bits?
For the shares in question, the unix permissions are not really important,
but managing the RO attribute is. It appears that this was the default
behavior in (very?) old Samba versions, but my server appears to simply
ignore RO attribute change requests.


There is, you need the following and your file system mounted with 
extended attributes enabled


# store DOS attributes in extended attributes
  ea support = yes
  store dos attributes = yes
  map readonly = no
  map archive = no
  map system = no
  map hidden = no


This is a HP-UX server, using the HP repackage of Samba, based on 3.4.3.
The HP build does not include support for file system extended attributes,
nor does it include the vfs_xattr_tdb module.



Then you are stuffed I believe.


JAB.

--
Jonathan A. Buzzard Email: jonathan (at) buzzard.me.uk
Fife, United Kingdom.
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Samba 3.4.3 and DOS read only

2012-08-16 Thread Jim Gallagher
Hi,

Is there an easy way to get Samba v3.4.3 to respond to client requests to
change the read-only attribute by setting/unsetting the unix write bits?
For the shares in question, the unix permissions are not really important,
but managing the RO attribute is. It appears that this was the default
behavior in (very?) old Samba versions, but my server appears to simply
ignore RO attribute change requests.

This is a HP-UX server, using the HP repackage of Samba, based on 3.4.3.
The HP build does not include support for file system extended attributes,
nor does it include the vfs_xattr_tdb module.

Thanks,
Jim Gallagher
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba