Hi,
I am reciveing files from a remote system on my linux box. These files are named based on time, which I can use to 'touch' the time .
I can access/modify these files using my id. but when I tried touching time using my id I am getting error;
My question is - Is it possible to touch a file with a different user? Any other changes that i can make to get this done?
The two users have following group access my id
uid=2006208(ab00) gid=2005275(ab) groups=2005275(ab)
creator of the file
uid=2006208(xb00) gid=2005275(ab) groups=2005275(ab)
file permissions:
-rwxrwxr-x 1 xb00 ab 7 Feb 1 11:51 1001261234_job2333
Also, i have tried touch using the sender's id and they are working fine with that.
Looked into forum and googled it as well .. but no lcuk
Last edited by vbe; 02-01-2010 at 09:39 AM..
Reason: use code tags please (not color...)
Your ab00 account has the same UID as xb00?
The fact that the file is group writable by the group your account abd the xb00 account are members of means you not have to own the file to change it so your ab00 account can have a separate UID to the xb00 account.
What are the permissions of the directory these files are in please? e.g. run:
TonyFullerMalv is right. You should be able to do so. Try touching non-existing file in the same dir first. This have to work as well. I can't see any other reason for this not working other than parent dir ownership or the bad implementation of unix permission system.
When the touch command is used to change the timestamps of an existing file, it invokes either the old utime() or the new utimes() system call. To change the timestamp on an existing file, you must own the file or be root. Also, you must have write permission on the file or be root.
"Also"? So you have to be both owner and have write permissions? This seems ... a wrong design.
Why? If you're not the owner of a file, it should by default be prohibited for you to change it. And even if you're the owner, you might want to protect it from accidental changes by removing your own write permission (you can add it again at any time, after all).
Hi,
I am facing a problem with the command - TOUCH on Linux.
See the example below:
File on Linux: rw-rw-r-- user1 user1 Jan 01 09:00 test.txt
The file - test.txt was created by the user - user1.
Now, I want to change the date and time, but using other user - user2
The user2... (12 Replies)
Here is the part of the script: I have modified the file name.:)
SSFILE=${My_HOME_DIR}/log/my_file_ss.log
export MM=`date '+%m'`
export DD=`date '+%d'`
export HH=`date '+%H'`
export MIN=`date '+%M'`
export HOURAGO=`echo ${HH} -1 |bc `
echo $HOURAGO
export TTIME=${MM}${DD}${HOURAGO}00... (5 Replies)
Hi,
I wish to change time stamp of a directory with all its subdirectories and files on server.
I am able to find following two ways but want to know which will be the better one. I have not tried anyone of them because I am not sure if it can effect my data:
find * -type d -exec touch... (5 Replies)
Hi,
1#what is the command to get name associated with userid?
2#I am using unix on Mainframes thru OMVS.
So any one know to to capture TSO command output to a variable on OMVS environment.
I tried with below script, but its not working!
#!/bin/ksh
output=$(tso whois PA1234)
echo... (6 Replies)
Hi All,
I got this userid apache with the same userid and groupid and /sbin/nologin and the /www/a home folder is empty.
Can I just delete this userid? How can I investigate if userid have something to do with the application?
Thanks for any comment you may add. (1 Reply)
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)
i want to find the files which are modified in last 30 to 120 minutes
i am using "find . -mmin +30 -mmin -120 "
it is giving me the error
find: bad option -mmin
find: path-list predicate-list
can somebody help me out .
Thank you (5 Replies)
I would like to know the difference between the real user-id and the
effective user-id. If user-A runs a program owned by user-B then
which is the real user-id and which is the effective user-id ? (1 Reply)