LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-05-2009, 09:06 AM   #1
groszdani
LQ Newbie
 
Registered: Sep 2009
Distribution: openSUSE
Posts: 1

Rep: Reputation: 0
Allow users other than the owner to change the mtime of a file


If I mount a FAT filesystem (e. g. a pendrive) as root with umask=000, the owner of every file on it will be root but any user will be able to write on it. If a non-root user writes to it, file modification times are not preserved because only the owner of the files can change the mtimes.

Is there a way to allow any user who can change the contents of a file to change its mtime as well? To me it would seem logical.
 
Old 09-08-2009, 06:00 PM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
I just tried this on Ubuntu 6.10 using kernel 2.6.17-12-generic and the modification time was adjusted for a normal user as I would expect. Perhaps this is a bug in the software you have?

For the record, as root:

Code:
mount -o umask=000 /dev/sdb1 /mnt/usb
echo hi > /mnt/usb/work_directory/test_mod
As a normal user:

Code:
echo there >> /mnt/usb/work_directory/test_mod
And the modification time reflected the change. I then edited the file as the normal user using vi, and again mtime changed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
using find to compare file mtime with another file's mtime TheFueley Linux - Newbie 1 12-23-2008 08:06 PM
why does sftp change mtime file attribute? hazelhill Linux - Software 3 10-17-2004 09:42 PM
how to i change file owner back to root ? glacier1985 Linux - Newbie 10 06-17-2004 09:20 PM
file permissions and file owner won't change Nadim Slackware 5 11-29-2003 06:03 PM
Change file owner in W2K on a RH8 server RobLea Linux - Networking 1 10-09-2003 05:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration