Issue209

classification
Title Samba and XEmacs and read-only
Type defect Module core code 21.4, core code 21.5
Severity inconvenience Platform x86, nt, mswindows
Keywords Nosy List SamB
explanation
process
These controls should only be changed by committers and tracker administrators.
Status deferred   Reason
Superseder   Submitted 2008-01-01.06:58:21
Priority normal   Assigned To

Created on 2008-01-19.06:43:14 by xemacweb, last changed 2011-01-25.04:56:22 by quietdragon.

Files
File name Uploaded Type Edit Remove
unnamed xemacweb, 2008-01-19.06:43:14 text/html
unnamed xemacweb, 2008-01-19.06:43:14 text/plain
Messages
msg2249 [hidden] ([hidden]) Date: 2011-01-25.04:56:21
  Message-ID: <1295931382.56.0.520448917436.issue209@xemacs.org>
This is such a frustrating annoyance. This issue is probably the same as:

http://tracker.xemacs.org/XEmacs/its/issue136

Strangely enough, (file-modes) shows something useful in my case, and
using it and the hint in issue136, I can craft a workaround:

;;; Force file-writable-p to use file modes
;;; 
;;; The default strategy does not work for Samba mounted file systems.
;;;
;;; http://tracker.xemacs.org/XEmacs/its/issue136
(fset #'file-writable-p #'(lambda (filename)
			    (let ((filemodes (file-modes filename)))
			      (if (not filemodes)
				t
				(/= 0 (logand filemodes #o200))))))
msg2238 [hidden] ([hidden]) Date: 2010-12-04.09:23:55
  Message-ID: <1291454635.89.0.595557633577.issue209@xemacs.org>
The MS Windows ports of XEmacs have always had Unixoid behavior w.r.t.
permissions.  The Windows-based developers for some reason have never
tried to fix the semantics properly for Windows.  It would be really
appreciated if somebody who knows what they are doing on Windows would
review that code.

I don't think it is anywhere near as simple as "XEmacs looks at the
World permissions", unfortunately.

It might be reasonable to hack the Windows port to determine user
permissions by simply trying to do the task.
msg2237 [hidden] ([hidden]) Date: 2010-11-13.20:21:05
  Message-ID: <1289679665.81.0.654834356352.issue209@xemacs.org>
I forgot,
the samba version on the slackware machine is 3.2.5.
msg2236 [hidden] ([hidden]) Date: 2010-11-13.20:16:52
  Message-ID: <1289679412.9.0.0253534197743.issue209@xemacs.org>
SamB,
This is my copy of /etc/samba/samba.conf:
# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2007/03/19 17:34:11

[global]


[rootfs]
comment = Root Filesystem
path = /
read only = No
fstype = Ext3

[mitchell]
path = /home/mitchell
read only = No
fstype = ext3

If there is any other incriminating evidence you need, just ask!

I'm not sure what to tell you about the width of a certain
message--maybe you could get a 30" monitor???
msg2229 [hidden] ([hidden]) Date: 2010-10-27.18:39:56
And these Samba shares are configured how, exactly? (And using what
Samba version?) I guess it's probably with security=user?

(Also, can someone do something about the width of msg359? I hate
horizontal scrollbars, plus it messes up the spacing of some of the
tables -- they get spread across the whole scrollable width.)
msg2221 [hidden] ([hidden]) Date: 2010-10-13.02:00:22
[version 21.4.22; July 2010]
I still find this problem using Xemacs 21.4.22.
Using Xemacs on XP to access a file on a samba share (slackware) lets 
me write to the root directory of the share, but not to 
subdirectories.  Says it is read only. I can save the file to my xp 
desktop, then use network places to copy the file to the samba share 
and it copies just fine.  Just won't save it there from within Xemacs 
on XP.
msg2217 [hidden] ([hidden]) Date: 2010-09-30.00:01:08
This bug still exists. I just checked: I can edit with cygwin emacs but
not with cygwin xemacs.

GNU Emacs 23.2.1 (i686-pc-cygwin) of 2010-05-08

vs

XEmacs 21.4 (patch 22) "Instant Classic" [Lucid] (i686-pc-cygwin, Mule)
of Sat Jan 31 2009 on vzell-de

fyi, all the cygwin tools can alter these samba shares, only XEmacs sees
them as non-writable.

Here is the final weirdness: the top level directory of the samba share
is writable to XEmacs. I can create files there. It is only the
subdirectories that XEmacs insists are not writable.

File not found and directory write-protected
msg1012 [hidden] ([hidden]) Date: 2009-02-12.10:14:45
I still experience the problem in 21.4 (patch 21).

I also experience, that an inconvenient work-around is to either
1) have the files in chmod 666, or
2) use M-x toggel-read-only and force to save

Any suggestions for a solution?
msg848 [hidden] ([hidden]) Date: 2008-11-06.17:23:09
I'm still seeing the problem with the 2008-10-12 windows 
build.  However I've managed to spot something.

If the UNIX file is given a permission of 666 then XEmacs 
will write it without complaint.  With my usual 664 I need to 
toggle read-only and say yes to "try to save anyway?".

I've been looking at the ACL of a 664 file in Windows 
Explorer for the groups or user names.  It shows that 
Everyone has Read permission,Unix Group\<me> and Unix User
\<me> have Read and Write permissions. So I surmise that 
XEmacs is only looking at the Everyone permissions when 
evaluating the potential success of an operation.
msg670 [hidden] ([hidden]) Date: 2008-04-10.08:21:09
I see the problem in '21.5  (beta28) "fuki" (+CVS-20071205) 
XEmacs Lucid' but it is not in '21.5  (beta17) "chayote" 
XEmacs Lucid'.  Both are native on XP SP2.
msg455 [hidden] ([hidden]) Date: 2008-01-22.07:52:53
See also issue218, for a report generated by M-x
report-xemacs-bug (but no new relevant detail, the username
change seems to be a red herring).
msg360 [hidden] ([hidden]) Date: 2008-01-19.06:43:15
  Message-ID: <loom.20080106T130056-899@post.gmane.org>
QZ <wildcat4096 <at> yahoo.com> writes:

been assumed to no longer be an issue.  Tonight I tried to edit a file served by
Samba with XEmacs 21.4.20, 21.4.21, and 21.5-b28.  Each attempt and each version
yielded the same result.  I.e. XEmacs would open the file read-only ignoring
true permissions.  After opening the file read-only, I would M-X
toggle-read-only, make my changes, and save.  This work around unfortunately
does not help if the file does not exist as XEmacs refuses to make files in
directories served by Samba.  It seems to think that all directories ar
>  e read-only.For what it is worth, this is not a problem with GNU Emacs 22.1. 
(I've been using XEmacs for years and would hate to switch now though :(
>  )If there is any more information that would be helpful or any work around
please contact me.

Hi all,

I had the same Problem when I upgraded from 21.4.19 to 21.4.21 (see my post in
this list from 2007-10-29. I noticed that just in between these two versions
something was changed in the handling of permissions in windows. More info can
be found in my last post.

Regards,
Hilmar

> Looking for last minute shopping deals?  
> Find them fast with Yahoo! Search.
> 
> 
> _______________________________________________
> XEmacs-Beta mailing list
> XEmacs-Beta <at> xemacs.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
> 

_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta@xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
msg359 [hidden] ([hidden]) Date: 2008-01-19.06:43:14
  Message-ID: <901829.21196.qm@web36808.mail.mud.yahoo.com>
Searching the forums it appears this problem is not new but perhaps it has been assumed to no longer be an issue.  Tonight I tried to edit a file served by Samba with XEmacs 21.4.20, 21.4.21, and 21.5-b28.  Each attempt and each version yielded the same result.  I.e. XEmacs would open the file read-only ignoring true permissions.  After opening the file read-only, I would M-X toggle-read-only, make my changes, and save.  This work around unfortunately does not help if the file does not exist as XEmacs refuses to make files in directories served by Samba.  It seems to think that all directories are read-only.

For what it is worth, this is not a problem with GNU Emacs 22.1.  (I've been using XEmacs for years and would hate to switch now though :( )

If there is any more information that would be helpful or any work around please contact me.

      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
History
Date User Action Args
2011-01-25 04:56:22quietdragonsetmessages: + msg2249
2010-12-04 09:23:55stephensetmessages: + msg2238
2010-11-13 20:21:05skmsetmessages: + msg2237
2010-11-13 20:16:52skmsetmessages: + msg2236
2010-10-27 18:50:05SamBsetmodule: + core code 21.5
2010-10-27 18:39:56SamBsetnosy: + SamB
messages: + msg2229
2010-10-13 02:00:22skmsetmessages: + msg2221
2010-09-30 00:01:08WamBamBoozlesetmessages: + msg2217
2009-02-12 10:14:45rasvedsetmessages: + msg1012
2008-11-06 17:23:09petefsetmessages: + msg848
2008-04-24 18:20:38stephensetstatus: chatting -> deferred
2008-04-10 08:21:09petefsetmessages: + msg670
2008-01-22 07:54:05stephenlinkissue218 superseder
2008-01-22 07:52:53stephensetseverity: inconvenience
messages: + msg455
module: + core code 21.4
priority: normal
platform: + x86, nt, mswindows
type: defect
2008-01-19 06:43:15hilmar.bergersetstatus: new -> chatting
messages: + msg360
2008-01-19 06:43:14xemacwebcreate