mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bodo Eggert <7eggert@gmx.de>
To: Jan Engelhardt <jengelh@computergmbh.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	hirofumi@mail.parknet.co.jp, linux-fsdevel@vger.kernel.org
Subject: Re: utimes() with vfat is problematic
Date: Wed, 11 Jul 2007 13:49:03 +0200	[thread overview]
Message-ID: <E1I8agq-0000cG-3k@be1.lrz> (raw)
In-Reply-To: <8Fkwa-6BT-29@gated-at.bofh.it>

Jan Engelhardt <jengelh@computergmbh.de> wrote:

> vfat does not know about ownership, hence the files are always owned by the
> vfat mounter (or whatever the uid= option specified). Which brings
> a problem to userspace programs trying to utime() but which do not
> run as the same user as the vfat mounter, because:
> 
> 
> fs/attr.c:53
> ret = -EPERM;
> [...]
> 
> /* Check for setting the inode time. */
> if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) {
> if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER))
>                         goto error;
>         }
> 
> 
> To trigger the problem:
> # mount /somevfat -o umask=0,uid=root
> $ touch -d "2005-05-05" /somevfat/myfile
> 
> I am not sure how this could be dealt with besides passing -o quiet to
> mount.vfat. Any ideas?

Would it be possible to allow any user to modify the fs by adding
"&& current->fsuid != -1"? I think it's commonly the desired behaviour.
Off cause the default behaviour should stay the same.
-- 
Those who hesitate under fire usually do not end up KIA or WIA. 

Friß, Spammer: pof@7o.7eggert.dyndns.org jhojzbk@I.7eggert.dyndns.org
 ysoMi@qRIeghz.7eggert.dyndns.org a-r@s.7eggert.dyndns.org

       reply	other threads:[~2007-07-11 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8Fkwa-6BT-29@gated-at.bofh.it>
2007-07-11 11:49 ` Bodo Eggert [this message]
2007-07-10  9:47 Jan Engelhardt
2007-07-10 10:18 ` Pawel Dziepak
2007-07-10 16:38   ` Jan Engelhardt
2007-07-10 16:54     ` Pawel Dziepak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1I8agq-0000cG-3k@be1.lrz \
    --to=7eggert@gmx.de \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=jengelh@computergmbh.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®