Protect a file against touch


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Protect a file against touch
# 1  
Old 05-02-2013
Protect a file against touch

Afternoon,

the stat command is used against a file to ascertain date created and last modification time. However a different individual if they so chose could use the touch command to alter the date created or modification time.

Is there anyway to protect against this ?

thanks
Steve
# 2  
Old 05-02-2013
Don't allow the other individual write permission to the file.
# 3  
Old 05-02-2013
If you want to specifically deny a single user to a single file, an ACL would be the best bet.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using touch to create a file

I have noticed that the following command works touch subtext_geopdf_to_.x However this one does not touch subtext_/geopdf/_to_/.x How can I create such a file without making it think I supplied a path? (2 Replies)
Discussion started by: kristinu
2 Replies

2. Cybersecurity

How to encrypt / password protect big Linux file?

Hello, i have around 20 backup files tar.gz with sensitive data. The sizes of these files are from around 200MB to around 20GB I want to secure these files so no one can read, use its contents. only me the method of encrypting, password protecting them should be fast, so for example in... (1 Reply)
Discussion started by: postcd
1 Replies

3. Shell Programming and Scripting

Check for a file and touch if not exist

Hi, I've a situation where i need to check for the file existence and create a zero byte file based on the parameter,in some cases i need to touch and in some case i dont need to touch with zero byte file please help me on parameterizing this touch command?? Regards. San (2 Replies)
Discussion started by: sandeep karna
2 Replies

4. Shell Programming and Scripting

Aging file not use and touch

Hi all, Need advice from expect, below is my scripts to find the file not use and touch in storage and other directory. This scripts divide by: 1. 30 days 2. 90 days 3. 180 days 4. 1 years 5. 3 years 6. 5 years Then count total size in GB from 6 each category. Sample my... (5 Replies)
Discussion started by: sheikh76
5 Replies

5. Shell Programming and Scripting

SCP and then touch .done file

All, I am looking to make a script and wanted to see if anyone could help out. The script will go through the directory, put a timestamp, transfer it and then create a touch $file.done script HEre is my initial idea, but I don't think it will work properly. Anyone able to help me refine it... (11 Replies)
Discussion started by: markdjones82
11 Replies

6. Shell Programming and Scripting

Password protect a zip file

Hi, I'm working on Solaris 9 and i need to unzip a password protected zip, which i can do using zip -Ppassword filename however when i have done what i need to do with the file is to zip the file back up with a password. Zip on my system is version 2.3 and does not support this? How can... (0 Replies)
Discussion started by: Pablo_beezo
0 Replies

7. Shell Programming and Scripting

Touch New File with First Line

I am interested in creating a new file from a KSH script where the first line is printed. I know how to create the file, but creating with a pre-defined first line is what I need help with. My code below creates the file, but how do I accomplish that and do it so that when I open that txt file... (5 Replies)
Discussion started by: royarellano
5 Replies

8. UNIX for Dummies Questions & Answers

Touch all files and subdirectories (recursive touch)

I have a folder with many subdirectories and i need to set the modified date to today for everything in it. Please help, thanks! I tried something i found online, find . -print0 | xargs -r0 touch but I got the error: xargs: illegal option -- r (5 Replies)
Discussion started by: glev2005
5 Replies

9. UNIX for Dummies Questions & Answers

Password protect a file

I have created a PHP page that I use to clean files on my machine. I would like to leave the file there but I want to password protect it so that I am the only one that can run it from the shell. Does anyone know how to do this? Thanks. -Cam (2 Replies)
Discussion started by: perryl7
2 Replies

10. UNIX for Dummies Questions & Answers

Protect a tar file with a password!!

Hi there, I just want to know if there's anyway to protect any tar file with a password that requierd when somebody want to extract that tar. thanks in advance regards, Abdulkarim (1 Reply)
Discussion started by: geoquest
1 Replies
Login or Register to Ask a Question