[Samba] Re: Can not clear Read-only attribute
Jeremy Allison
jra at samba.org
Thu Mar 12 00:45:36 GMT 2009
On Thu, Mar 12, 2009 at 12:30:55AM +0000, tom m. wrote:
> If it were a permission problem, then it wouldn't be possible to set Read-only
> attribute in the first place, correct?
>
> Here's the result of creating an empty file called 'test.txt' via notepad, as
> viewed from the linux-side. The 'create mask' is 711 and 'map archive' is yes:
>
> -rwx------ 1 root root 0 Mar 11 2009 test.txt*
>
> Result after right-clicking test.txt and setting Read-only attribute:
>
> -r-x------ 1 root root 0 Mar 11 18:02 test.txt*
>
> Now if I right-click test.txt again and try to clear Read-only attribute,
> windows reports "Access denied" and permissions stay the same:
>
> -r-x------ 1 root root 0 Mar 11 18:02 test.txt*
>
> Now if I 'chmod 502 test.txt' we get:
>
> -r-x----w- 1 root root 0 Mar 11 18:02 test.txt*
>
> Right-click 'test.txt' in explorer and file still shows as Read-only, but
> clearing Read-only now works and we get this:
>
> -rwx----w- 1 root root 0 Mar 11 18:02 test.txt*
>
>
> Here is output of 'testparm':
>
> [global]
> workgroup = MSHOME
> server string = Samba server
> null passwords = Yes
> log level = 3
> log file = /var/log/sambalog
> unix extensions = No
> load printers = No
> printcap name = /dev/null
> disable spoolss = Yes
> show add printer wizard = No
> local master = No
> ldap ssl = no
> force user = root
> create mask = 0711
> directory mask = 0711
> use sendfile = Yes
> map hidden = Yes
> map system = Yes
> msdfs root = Yes
Ah, you're mapping attributes into file permissions.
That's not a good idea these days. Use extended attributes
and map DOS attributes into ea's instead.
ea support = yes
store dos attributes = yes
map system = no
map archive = no
map readonly = no
Jeremy.
More information about the samba
mailing list