Gnus development mailing list
 help / color / mirror / Atom feed
* Re: How to make gnus store received mail in the directory /mnt/windows?
@ 2005-08-15 16:08 romeomedina
  2005-08-15 16:35 ` David S. Goldberg
  0 siblings, 1 reply; 24+ messages in thread
From: romeomedina @ 2005-08-15 16:08 UTC (permalink / raw)
  Cc: ding

Adam Sjøgren wrote:

> drwxrwxrwx  30 root    root    16384 gen  1  1970 windows/
>
> That looks fine (well, everybody can read and write), but how does the
> permissions inside /mnt/windows look?


Under /mnt/windows I created the directory /mnt/windows/mail-prova,
and gnus in turn created the directory /mnt/windows/mail-prova/mail/misc.
The command ls with the option -l shos that all the permissions look fine:

drwxrwxrwx   3 root root   16384 ago 14 18:02 mail-prova/

drwxrwxrwx  3 root root 16384 ago 14 18:02 mail/

drwxrwxrwx  2 root root 16384 ago 15 00:35 misc/

. In my .gnus.el there's the line:

(nnml-directory "/mnt/windows/mail-prova")

. But when I try to retrieve mail to put there, gnus says:

Doing chmod: operation not permitted, /mnt/windows/mail-prova/mail/misc/60

. I can't explain to myself:
the permissions look all right.
Thanks indeed for your help,
Rodolfo




____________________________________________________________
Libero Flat, sempre a 4 Mega a 19,95 euro al mese! 
Abbonati subito su http://www.libero.it






^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: How to make gnus store received mail in the directory /mnt/windows?
@ 2005-08-15 22:21 romeomedina
  2005-08-16 21:05 ` Rodolfo Medina
  0 siblings, 1 reply; 24+ messages in thread
From: romeomedina @ 2005-08-15 22:21 UTC (permalink / raw)
  Cc: romeomedina

Rodolfo Medina <romeomedina <at> libero.it> writes:

> But then, no other user different than the one set
> in /etc/fstab will be able to do the same thing, i.e. store mail with gnus
> in the vfat file system /mnt/windows:
> unless the command chmod can change permissions also to
> all the files of a certain directory, even those that don't exist yet.
> This way, the user uid 501 could make writable *all* the files of
> /mnt/windows/mail-prova/mail/misc, also the future ones, and then
> other users could store there their mails with gnus.



Sorry, that's obviously wrong:
gnus wants to prevent other users from reading
the files it creates, so it couldn't be a solution anyway.

Rodolfo




____________________________________________________________
Libero Flat, sempre a 4 Mega a 19,95 euro al mese! 
Abbonati subito su http://www.libero.it






^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: How to make gnus store received mail in the directory /mnt/windows?
@ 2005-08-15 22:06 romeomedina
  0 siblings, 0 replies; 24+ messages in thread
From: romeomedina @ 2005-08-15 22:06 UTC (permalink / raw)
  Cc: ding

Derrell wrote:

> The fields on each line are separated by spaces.  The fourth field is the
> options field, with options separated by commas.  The fifth and sixth fields
> (both zeros in this case) are not part of the options.


Yes, the problem seems to be solved editing the file /etc/fstab and replacing the line:
/dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850 0 0
with:
/dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850,uid=501,gid=501 0 0


Derrell:

> I'm not sure, however, what the vfat
> file system returns when the POSIX chmod() call is used to change permissions,
> since there is no such concept of permissions on a FAT file system.  It may
> return an error, in which case any application that requires being able to
> change permissions on a file will fail to operate properly on a Unix/Linux-
> mounted FAT file system.


The attempt of doing chmod by a different user than `rodolfo' generates
an error message:

[carolina@localhost carolina]$ chmod o+r /mnt/windows
chmod: changing permissions of `/mnt/windows': Operation not permitted


Derrell:

> I highly suspect that gnus is doing chmod() as
> a security precaution, to ensure that your messages are not readable by anyone
> other than yourself.  If so, then it's unlikely that that feature would be
> removed.


That seems to be true: in fact I did:
$ ls -l /mnt/windows/mail-prova/mail/misc
, and it is shown that the files gnus just created,
when retrieving mail and storing it in that dir,
are only readable (and writable, of course) by the user rodolfo:

-rw-------  1 rodolfo rodolfo   827 Aug 15 22:20 61
-rw-------  1 rodolfo rodolfo 15007 Aug 15 22:20 62
-rw-------  1 rodolfo rodolfo  1145 Aug 15 22:20 63



Derrell:

> Either gnus will have to change to not consider a
> chmod() failure to be fatal, or you will have to use a different file system
> for your message repository.
> [...]
> It could also be that only the simulated owner is allowed to issue the chmod()
> call on a mounted FAT file system, in which case setting uid and gid may help.


That also seems to be true:
in fact, as user `rodolfo' I was able to change permissions over /mnt/windows
and its subdirs.

But then, no other user different than the one set
in /etc/fstab will be able to do the same thing, i.e. store mail with gnus
in the vfat file system /mnt/windows:
unless the command chmod can change permissions also to
all the files of a certain directory, even those that don't exist yet.
This way, the user uid 501 could make writable *all* the files of
/mnt/windows/mail-prova/mail/misc, also the future ones, and then
other users could store there their mails with gnus.
Is that possible?

Thanks to all who've been providing help,
Rodolfo




____________________________________________________________
Libero Flat, sempre a 4 Mega a 19,95 euro al mese! 
Abbonati subito su http://www.libero.it






^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: How to make gnus store received mail in the directory /mnt/windows?
@ 2005-08-15 19:40 romeomedina
  2005-08-15 19:57 ` Derrell.Lipman
  2005-08-15 20:00 ` Adam Sjøgren
  0 siblings, 2 replies; 24+ messages in thread
From: romeomedina @ 2005-08-15 19:40 UTC (permalink / raw)
  Cc: ding

Adam Sjøgren:

> Gnus tries to change the permissions.
> [...]
> Of the files it creates, not of the directory!

Go on excusing my ignorance:
if everybody can read and write inside the directory /mnt/windows
and all its subdirs, what's the need for gnus to change the permissions
of the files it creates inside /mnt/windows?


Rodolfo:

> I tried to do the same, but [...]


Adam Sjøgren:

> WHY?
>
> The commands I showed you just illustrates that you can work around
> the lack of unixy permissions-support in vfat by setting uid and gid
> in your fstab on Linux.


BECAUSE:
since I didn't manage to properly set uid and gid
in my fstab on Linux I wanted to check if I was well understanding
your indications.


Rodolfo:

> in my /etc/fstab I changed the line:

> /dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

> into:

> /dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850 0 0,uid=501,gid=501

> . Is that what you meant?


Adam:

> Read the manual-page for fstab. (Hint: you put the options in the
> wrong place). Besides that: yes.


What's it, a guessing game?
I read all through the fstab manual, and also the mount options for fat,
and neither there nor there it is said what the right place should be
for the uid and gid options.


Yours sincerely, and thanks again.
Rodolfo




____________________________________________________________
Libero Flat, sempre a 4 Mega a 19,95 euro al mese! 
Abbonati subito su http://www.libero.it






^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: How to make gnus store received mail in the directory /mnt/windows?
@ 2005-08-15 18:25 romeomedina
  2005-08-15 18:40 ` Adam Sjøgren
  0 siblings, 1 reply; 24+ messages in thread
From: romeomedina @ 2005-08-15 18:25 UTC (permalink / raw)
  Cc: ding

Adam Sjøgren wrote:

> Gnus tries to change the permissions.


But why? We saw that the permissions were all right.


Adam:

>  $ dd if=/dev/null of=disk.img bs=1k count=1024
>  0+0 records in
>  0+0 records out
>  0 bytes transferred in 0.001096 seconds (0 bytes/sec)
>  $ sudo mount disk.img /mnt/floppy/ -t vfat -o loop=/dev/loop3,blocksize=1024,umask=0


I tried to do the same, but:

[rodolfo@localhost rodolfo]$ dd if=/dev/null of=disk.img bs=1k count=1024
0+0 records in
0+0 records out
[rodolfo@localhost rodolfo]$ su
Password:
[root@localhost rodolfo]# mount disk.img /mnt/floppy/ -t vfat -o loop=/dev/loop3,blocksize=1024,umask=0
mount: permission denied

. How can a permission be denied to root?


Adam:

> Try setting uid and gid in your fstab to your users uid and gid, and
> see if that helps.


I did:

[rodolfo@localhost rodolfo]$ id
uid=501(rodolfo) gid=501(rodolfo) groups=501(rodolfo)

, then in my /etc/fstab I changed the line:

/dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850 0 0

into:

/dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850 0 0,uid=501,gid=501

. Is that what you meant? Then I rebooted the computer.
But now the command 'ls -l /mnt' gave:

drwxr--r--  30 root root 16384 gen  1  1970 windows/

This looks very very strange to me.
I connected to internet, launched emacs, opened uo gnus,
and whan I tried to enter the nnml group it said:

Unable to contact server: Couldn't create directory: /mnt/windows/mail-prova

. I'm lost.
Please, any other hint?

Rodolfo




____________________________________________________________
Libero Flat, sempre a 4 Mega a 19,95 euro al mese! 
Abbonati subito su http://www.libero.it






^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: How to make gnus store received mail in the directory /mnt/windows?
@ 2005-08-15 14:58 romeomedina
  0 siblings, 0 replies; 24+ messages in thread
From: romeomedina @ 2005-08-15 14:58 UTC (permalink / raw)
  Cc: ding

Rodolfo Medina wrote:

> I want gnus to store my received mail in a certain directory,
> let's call it `/path/to/mydir'. To do so, I just put in my .gnus.el
> the following:
>
> (setq gnus-select-method  '(nnml "received-mail"
> 				 (nnml-directory "/path/to/mydir")
> ))
>
> , and it works fine.
> Now, the problem is that the desired directory is /mnt/windows,
> and gnus refuses to store mail there, maybe because of a matter of
> permissions. But the command `$ ls -l /mnt' shows that the
> dir /mnt/windows is writable by all users.
> How can I work the problem out?


Henrik Enberg wrote:

> What OS are you trying this from, and what OS is /mnt/windows?  For
> example, The Linux kernel can't write to NTFS file systems.


Dave Goldberg wrote:

> [...] Yes, unless
> one is very brave and enables NTFS writing by hand (I'm not aware of
> any Linux distro that will provide you with it) an NTFS file system
> locally mounted will be read-only.


Rodolfo:

> Yes, it is a linux-windows dual boot system.
> The MS Windows partition is under the /mnt/windows directory.


Adam Sjøgren wrote:

> You haven't disclosed what filesystem you are using on /mnt/windows
> yet.


Sorry, I was giving for certain it was an ntfs one.


Rodolfo:

> But there's something I don't understand:
>
> 1) I regularly write files and directories from linux into /mnt/windows,
>    without problems. Why does the problem with the NTFS file system
>    only arise when I want gnus to do what I usually do?


Adam Sjøgren:

> If you do this - write new files - you are probably using a
> vfat-filesystem and not ntfs?
>
> You can check this with the 'mount' command (just run it without any
> arguments).

Yes, the 'mount' command run without arguments shows that on /mnt/windows
there is a vfat filesystem:

[rodolfo@localhost rodolfo]$ mount
/dev/hda8 on / type ext3 (rw)
none on /proc type proc (rw)
none on /proc/bus/usb type usbfs (rw)
none on /sys type sysfs (rw)
none on /mnt/floppy type supermount (rw,sync,dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,codepage=850)
/dev/hda1 on /mnt/windows type vfat (rw,umask=0,iocharset=iso8859-15,codepage=850)



Rodolfo:

> 2) If I start emacs as root, and then open gnus from within
>    emacs, then I manage to do what I want.



Adam Sjøgren:

> That sounds like you've got a problem with permissions.
>
> You should double-check that the normal user has permissions to do
> what is needed on /mnt/windows.


The output of: 'ls -l /mnt' shows that any normal user has write
permissions onto the /mnt/windows directory (is that right?):

[root@localhost rodolfo]# ls -l /mnt
total 48
drwxr-xr-x   2 root    root     4096 gen 22  2005 cdrom/
drwxr-xr-x   2 root    root     4096 gen 22  2005 cdrom2/
drwxr-xr-x   2 root    root     4096 ago 10 15:26 cdrom3/
drwxrwxrwx   0 root    root        0 ago 15 10:18 floppy/
drwxr-xr-x   2 root    root     4096 gen 22  2005 linux1/
drwxr-xr-x   2 root    root     4096 feb  6  2005 linux2/
drwxr-xr-x   2 root    root     4096 apr 16 19:45 linux4/
drwxr-xr-x  19 rodolfo rodolfo  4096 ago 15 00:00 linux5/
drwxrwxrwx   3 root    root     4096 ago 14 17:41 newdir/
drwxrwxrwx  30 root    root    16384 gen  1  1970 windows/


Adam Sjøgren:

> Do provide details, otherwise helping you will be tedious and
> longwinded.

I'm sorry, I'm newbie with linux, I'm doing all my best to provide
all information about the matter.


Adam Sjøgren:

> Look at the mount-options uid, gid, umask, dmask and fmask for fat
> (see 'man mount' and /etc/fstab).


That is a bit hard for me. Anyway, in /etc/fstab there's the following:

/dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850 0 0
none /proc proc defaults 0 0

. The mount manual does not seem to be very helpful to me:
the uid and gid options for fat say:

       uid=value and gid=value
              Set the owner and group of all files.
              (Default: the uid and  gid
              of the current process.)

. Now, the output of 'ls -l /mnt' shows that /mnt/windows
belongs to
the owner root and to the group root, but normal users do
have the write
permissions.

Any other hint?
Thanks indeed,
Rodolfo

P.S.: I tried to send the message to the gmane.emacs.gnus
      newsgroup, but didn't manage to. I'll try again.



____________________________________________________________
Libero Flat, sempre a 4 Mega a 19,95 euro al mese! 
Abbonati subito su http://www.libero.it






^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: How to make gnus store received mail in the directory /mnt/windows?
@ 2005-08-15  8:57 romeomedina
  0 siblings, 0 replies; 24+ messages in thread
From: romeomedina @ 2005-08-15  8:57 UTC (permalink / raw)
  Cc: ding

Rodolfo Medina wrote:

> I want gnus to store my received mail in a certain directory,
> let's call it `/path/to/mydir'. To do so, I just put in my .gnus.el
> the following:
>
> (setq gnus-select-method  '(nnml "received-mail"
> 				 (nnml-directory "/path/to/mydir")
> ))
>
> , and it works fine.
> Now, the problem is that the desired directory is /mnt/windows,
> and gnus refuses to store mail there, maybe because of a matter of
> permissions. But the command `$ ls -l /mnt' shows that the
> dir /mnt/windows is writable by all users.
> How can I work the problem out?


Henrik Enberg wrote:

> What OS are you trying this from, and what OS is /mnt/windows?  For
> example, The Linux kernel can't write to NTFS file systems.


Dave Goldberg wrote:

> [...] Yes, unless
> one is very brave and enables NTFS writing by hand (I'm not aware of
> any Linux distro that will provide you with it) an NTFS file system
> locally mounted will be read-only.


Thanks indeed for your kind replies.
Yes, it is a linux-windows dual boot system.
The MS Windows partition is under the /mnt/windows directory.
It is a shame the matter looks to be a difficult one.
But there's something I don't understand:

1) I regularly write files and directories from linux into /mnt/windows,
   without problems. Why does the problem with the NTFS file system
   only arise when I want gnus to do what I usually do?

2) If I start emacs as root, and then open gnus from within
   emacs, then I manage to do what I want. Why does the problem
   with the NTFS file system not arise then?

Finally, do you think a solution is possible, and give some hint
about how to achieve it?

Thanks indeed,
Rodolfo




____________________________________________________________
Libero Flat, sempre a 4 Mega a 19,95 euro al mese! 
Abbonati subito su http://www.libero.it






^ permalink raw reply	[flat|nested] 24+ messages in thread
* How to make gnus store received mail in the directory /mnt/windows?
@ 2005-08-14 22:33 Rodolfo Medina
  2005-08-15  3:11 ` Henrik Enberg
  2005-08-15  3:18 ` Dave Goldberg
  0 siblings, 2 replies; 24+ messages in thread
From: Rodolfo Medina @ 2005-08-14 22:33 UTC (permalink / raw)


Hi.

I want gnus to store my received mail in a certain directory,
let's call it `/path/to/mydir'. To do so, I just put in my .gnus.el
the following:

(setq gnus-select-method  '(nnml "received-mail"
				 (nnml-directory "/path/to/mydir")
))

, and it works fine.
Now, the problem is that the desired directory is /mnt/windows,
and gnus refuses to store mail there, maybe because of a matter of
permissions. But the command `$ ls -l /mnt' shows that the
dir /mnt/windows is writable by all users.
How can I work the problem out?

Thanks for any help,
Rodolfo





^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2005-08-16 21:05 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-15 16:08 How to make gnus store received mail in the directory /mnt/windows? romeomedina
2005-08-15 16:35 ` David S. Goldberg
2005-08-15 18:39   ` Rodolfo Medina
  -- strict thread matches above, loose matches on Subject: below --
2005-08-15 22:21 romeomedina
2005-08-16 21:05 ` Rodolfo Medina
2005-08-15 22:06 romeomedina
2005-08-15 19:40 romeomedina
2005-08-15 19:57 ` Derrell.Lipman
2005-08-15 20:02   ` Adam Sjøgren
2005-08-15 21:47   ` Rodolfo Medina
2005-08-15 22:18     ` Rodolfo Medina
2005-08-15 20:00 ` Adam Sjøgren
2005-08-15 18:25 romeomedina
2005-08-15 18:40 ` Adam Sjøgren
2005-08-15 19:48   ` Rodolfo Medina
2005-08-15 14:58 romeomedina
2005-08-15  8:57 romeomedina
2005-08-14 22:33 Rodolfo Medina
2005-08-15  3:11 ` Henrik Enberg
2005-08-15  3:25   ` Dave Goldberg
2005-08-15  9:00     ` Rodolfo Medina
2005-08-15  9:36       ` Adam Sjøgren
2005-08-15 15:19         ` Rodolfo Medina
2005-08-15  3:18 ` Dave Goldberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).