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 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 22:21 romeomedina
@ 2005-08-16 21:05 ` Rodolfo Medina
  0 siblings, 0 replies; 24+ messages in thread
From: Rodolfo Medina @ 2005-08-16 21:05 UTC (permalink / raw)


Many thanks to all who contributed to solve
this interesting problem with their replies.
I'm giving a report that might be useful to others
in future.

Rodolfo
	
	
-------------------------------------------------------------------------
To make gnus store received mail in desired directory,
let's call it /path/to/mydir, I put in my .gnus.el
the following:

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


, and it worked fine unless the desired directory was:
/mnt/windows or one of its subdirs. In that case, when gnus
tried to fetch new mail it failed, and in the echo area 
such a message appeared:

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

. This happened because, when creating the new files where to put received mail,
gnus tries to do `chmod' in order to change the permissions of those files:
all read and write permissions are denied to other users different from
yourself: gnus is doing chmod as a security precaution, 
to ensure that your messages are not readable by anyone other than yourself.

But, the /mnt/windows partition is a vfat one, as it was shown
giving the mount command:

[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)

, and vfat partitions lack of support for unix-style permissions.
So, the gnus' request of doing 'chmod' could not be satisfied
for /mnt/windows.
That is the meaning of the error message.

To solve the problem, all I had to do was to set `rodolfo'
in /etc/fstab as /mnt/windows's owner.
That way, all files and folders in /mnt/windows will be 
"simulated" owned by user rodolfo, group rodolfo (since there are no
users/groups in reality, on a FAT file system).
But actually, only the simulated owner is allowed to issue the chmod
call on a mounted FAT file system. So, now gnus could do `chmod' 
through the user rodolfo and the problem was solved.

To do so, I did:

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

, and then in /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,uid=501,gid=501 0 0

, where (see fstab man): 

/dev/hda1 							is the first field;
/mnt/windows 							is the second field;
vfat								is the third field;
umask=0,iocharset=iso8859-15,codepage=850,uid=501,gid=501	is the fourth field;
0								is the fifth field;
0								is the sixth field.



. The only problem left is that other users different from `rodolfo'
will not be able to store their mail into /mnt/windows.





^ 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 21:47   ` Rodolfo Medina
@ 2005-08-15 22:18     ` Rodolfo Medina
  0 siblings, 0 replies; 24+ messages in thread
From: Rodolfo Medina @ 2005-08-15 22:18 UTC (permalink / raw)


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







^ 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: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
  1 sibling, 1 reply; 24+ messages in thread
From: Rodolfo Medina @ 2005-08-15 21:47 UTC (permalink / raw)


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





^ 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:57 ` Derrell.Lipman
@ 2005-08-15 20:02   ` Adam Sjøgren
  2005-08-15 21:47   ` Rodolfo Medina
  1 sibling, 0 replies; 24+ messages in thread
From: Adam Sjøgren @ 2005-08-15 20:02 UTC (permalink / raw)


On Mon, 15 Aug 2005 15:57:17 -0400, Derrell.Lipman@UnwiredUniverse.com wrote:

> 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 seems to be exactly the case.


  :-),

-- 
 "Remember, Robert, in life anything can happen."             Adam Sjøgren
                                                         asjo@koldfront.dk




^ 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
  1 sibling, 0 replies; 24+ messages in thread
From: Adam Sjøgren @ 2005-08-15 20:00 UTC (permalink / raw)


On Mon, 15 Aug 2005 21:40:38 +0200, romeomedina\@libero\.it wrote:

> What's it, a guessing game?

No. It is helping you to learn to find the information yourself.

> I read all through the fstab manual,

You did? Okay, that is all I can ask.

In the line in your fstab, do you see where all the other options are,
with commas between them? The part that says:
"umask=0,iocharset=iso8859-15,codepage=850"?

Try adding ",uid=501,gid=501" to those. Leaving you with a line like
this in your fstab:

# 1        2           3    4(!)
/dev/hda1 /mnt/windows vfat umask=0,iocharset=iso8859-15,codepage=850,uid=501,gid=501 0 0

> 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.

In the middle of the fstab man-page it says:

 "The fourth field, (fs_mntops), describes the mount options associated
  with the filesystem.

  It is formatted as a comma separated list of options. It contains at
  least the type of mount plus any additional options appropriate to
  the filesystem type. For documentation on the available options for
  non- nfs file systems, see mount(8). For documentation on all
  nfs-specific options have a look at nfs(5). Common for all types of
  file system are the options ``noauto'' (do not mount when "mount -a"
  is given, e.g., at boot time), ``user'' (allow a user to mount), and
  ``owner'' (allow device owner to mount), and ``comment'' (e.g., for
  use by fstab-main- taining programs). The ``owner'' and ``comment''
  options are Linux- specific. For more details, see mount(8)."


  Best regards,

-- 
 "Remember, Robert, in life anything can happen."             Adam Sjøgren
                                                         asjo@koldfront.dk




^ 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:02   ` Adam Sjøgren
  2005-08-15 21:47   ` Rodolfo Medina
  2005-08-15 20:00 ` Adam Sjøgren
  1 sibling, 2 replies; 24+ messages in thread
From: Derrell.Lipman @ 2005-08-15 19:57 UTC (permalink / raw)
  Cc: asjo, ding

> 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.

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.

This is likely the line you're looking for:

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

That will mount /dev/hda1 on the mountpoint /mnt/windows and all files and
folders will be "simulated" owned by user 501, group 501 (since there are no
users/groups in reality, on a FAT file system).

This may or may not solve your problem.  Without setting uid and gid, it
appeared that /mnt/windows was writable.  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.  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.  (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.)

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.

Derrell



^ 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:40 ` Adam Sjøgren
@ 2005-08-15 19:48   ` Rodolfo Medina
  0 siblings, 0 replies; 24+ messages in thread
From: Rodolfo Medina @ 2005-08-15 19:48 UTC (permalink / raw)


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,codepage850 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







^ 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
  2005-08-15 19:48   ` Rodolfo Medina
  0 siblings, 1 reply; 24+ messages in thread
From: Adam Sjøgren @ 2005-08-15 18:40 UTC (permalink / raw)
  Cc: ding

On Mon, 15 Aug 2005 20:25:39 +0200, romeomedina\@libero\.it wrote:

> Adam Sjøgren wrote:

>> Gnus tries to change the permissions.

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

Of the files it creates, not of the directory!

> Adam:

>> $ dd if=/dev/null of=disk.img bs=1k count=1024

(I miswrote that line there - should have been /dev/zero).

[...]

>> $ sudo mount disk.img /mnt/floppy/ -t vfat -o loop=/dev/loop3,blocksize=1024,umask=0

> I tried to do the same, but:

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.

> 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?

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

> Please, any other hint?

Read. Some. Manuals.


  Best regards,

       Adam

-- 
 "Remember, Robert, in life anything can happen."             Adam Sjøgren
                                                         asjo@koldfront.dk



^ 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 16:35 ` David S. Goldberg
@ 2005-08-15 18:39   ` Rodolfo Medina
  0 siblings, 0 replies; 24+ messages in thread
From: Rodolfo Medina @ 2005-08-15 18:39 UTC (permalink / raw)


David S. Goldberg <david.goldberg6 <at> verizon.net> writes:

> 
> >>>>> On Mon, 15 Aug 2005 18:08:43 +0200, "romeomedina <at> libero.it"
<romeomedina <at> libero.it> said:
> 
> > . But when I try to retrieve mail to put there, gnus says:
> 
> > Doing chmod: operation not permitted, /mnt/windows/mail-prova/mail/misc/60
> 
> chmod is a "UNIX-ism".  It has no meaning on a FAT filesystem.

All right, but why does gnus try to change the permissions?
The command 'ls -l /mnt' shows clearly that everybody can read and write
onto the /mnt/windows directory:

drwxrwxrwx  30 root    root    16384 gen  1  1970 windows/

. Do you have any suggestion of how to work the problem out?
Cheers,
Rodolfo








^ 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 16:08 romeomedina
@ 2005-08-15 16:35 ` David S. Goldberg
  2005-08-15 18:39   ` Rodolfo Medina
  0 siblings, 1 reply; 24+ messages in thread
From: David S. Goldberg @ 2005-08-15 16:35 UTC (permalink / raw)


>>>>> On Mon, 15 Aug 2005 18:08:43 +0200, "romeomedina@libero.it" <romeomedina@libero.it> said:

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

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

chmod is a "UNIX-ism".  It has no meaning on a FAT filesystem.

-- 
Dave Goldberg
david.goldberg6@verizon.net






^ 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 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  9:36       ` Adam Sjøgren
@ 2005-08-15 15:19         ` Rodolfo Medina
  0 siblings, 0 replies; 24+ messages in thread
From: Rodolfo Medina @ 2005-08-15 15:19 UTC (permalink / raw)


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






^ 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  9:00     ` Rodolfo Medina
@ 2005-08-15  9:36       ` Adam Sjøgren
  2005-08-15 15:19         ` Rodolfo Medina
  0 siblings, 1 reply; 24+ messages in thread
From: Adam Sjøgren @ 2005-08-15  9:36 UTC (permalink / raw)


On Mon, 15 Aug 2005 09:00:29 +0000 (UTC), Rodolfo wrote:

> The MS Windows partition is under the /mnt/windows directory.

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

> 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?

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).

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

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.

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

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

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


  Best regards,

-- 
 "parsley, sage, rosemary and KOMPRESSOR"                     Adam Sjøgren
                                                         asjo@koldfront.dk




^ 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  3:25   ` Dave Goldberg
@ 2005-08-15  9:00     ` Rodolfo Medina
  2005-08-15  9:36       ` Adam Sjøgren
  0 siblings, 1 reply; 24+ messages in thread
From: Rodolfo Medina @ 2005-08-15  9:00 UTC (permalink / raw)


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





^ 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

* Re: How to make gnus store received mail in the directory /mnt/windows?
  2005-08-15  3:11 ` Henrik Enberg
@ 2005-08-15  3:25   ` Dave Goldberg
  2005-08-15  9:00     ` Rodolfo Medina
  0 siblings, 1 reply; 24+ messages in thread
From: Dave Goldberg @ 2005-08-15  3:25 UTC (permalink / raw)
  Cc: Rodolfo Medina, ding

>>>>> On Mon, 15 Aug 2005 05:11:42 +0200 (CEST), Henrik Enberg <henrik.enberg@telia.com> said:

> 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.

I should have considered dual boot as well as network.  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.

-- 
Dave Goldberg
david.goldberg6@verizon.net




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

* Re: 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
  1 sibling, 0 replies; 24+ messages in thread
From: Dave Goldberg @ 2005-08-15  3:18 UTC (permalink / raw)


>>>>> On Sun, 14 Aug 2005 22:33:57 +0000 (UTC), Rodolfo Medina <romeomedina@libero.it> said:

> 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?

/mnt/windows sounds suspiciously like a network mount, in particular,
one from a windows based server.  UNIX permissions may not, and in
fact probably do not, apply.  You need to look at the permissions on
the server side, in their native form, and figure out what you have to
open up to allow writing from the network.

-- 
Dave Goldberg
david.goldberg6@verizon.net




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

* Re: 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:25   ` Dave Goldberg
  2005-08-15  3:18 ` Dave Goldberg
  1 sibling, 1 reply; 24+ messages in thread
From: Henrik Enberg @ 2005-08-15  3:11 UTC (permalink / raw)
  Cc: ding

> From:  Rodolfo Medina <romeomedina@libero.it>
> Date: Sun, 14 Aug 2005 22:33:57 +0000 (UTC)
> 
> 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?

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.



^ 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 22:06 How to make gnus store received mail in the directory /mnt/windows? romeomedina
  -- 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 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 16:08 romeomedina
2005-08-15 16:35 ` David S. Goldberg
2005-08-15 18:39   ` 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).