LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old Today, 10:10 AM   #1
exerceo
Member
 
Registered: Oct 2022
Posts: 152

Rep: Reputation: 31
Question How to allow everyone to set the last modified time of a file?


[Log in to get rid of this advertisement]
cp -p allows preserving date and time stamps and touch has some parameters to set a custom last modified time (mtime).

But normally, in Linux (and Android by extension), only a file owner can set a custom date and time.

Is there a way to give everyone the ability to set a custom date and time of a file?
 
Old Today, 10:24 AM   #2
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 966
Blog Entries: 1

Rep: Reputation: 441Reputation: 441Reputation: 441Reputation: 441Reputation: 441
I have not used this on Linux, but I have used it on AIX. I believe Linux does have this ability, depending on distro and file system.

https://wiki.archlinux.org/title/Extended_attributes

I am rather sure there is a way of doing that under Linux. You need to use attributes to give specific users write access to the file. Maybe you can use it to prevent deletion too.
 
Old Today, 10:28 AM   #3
lvm_
Senior Member
 
Registered: Jul 2020
Posts: 1,732

Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
[dumb post deleted]

Last edited by lvm_; Today at 10:33 AM.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to check the last modified time of the file. anandg111 Linux - Newbie 5 01-05-2012 04:55 PM
script to execute a command based on the last modified time of a folder midadala Linux - Newbie 1 10-19-2010 07:28 AM
[SOLVED] file properties - last access/modified time gmsa Programming 2 04-22-2010 07:27 AM
utility to update the last modified time of a directory RajRed Linux - Newbie 4 02-20-2006 04:34 PM
PHP last time modified script time way off GabeF Programming 2 11-05-2002 08:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:55 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