How remove the file which was created by another user?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How remove the file which was created by another user?
# 1  
Old 03-22-2010
How remove the file which was created by another user?

When I try to remove the file which was created by another user through super user, I am getting the "override protection 644 " meesage.

Could you please anyone help me how will I delete the file without prmpting the override protection.

I have also given the permission (rwx) to the group as well.

Ex : -

Code:
$pwd
/root/mydir/kandir/
$ ls -ltr | grep '^d'
drwxrwxr-x   2 kandir   staff         96 Mar 22 02:37 mydir
$
$cd mydir
$ pwd
/root/mydir/kandir/mydir
$
$ ls -ltr
total 16
-rw-r--r--   1 kandir   staff          3 Mar 22 02:37 hi.txt
$ su - reddy
Password:
$ pwd
/root/mydir/reddy
$
$ cd /root/mydir/kandir/mydir
$
$ pwd
/root/mydir/kandir/mydir
$
$ rm hi.txt
rm: hi.txt: override protection 644 (yes/no)? ^C
$
$
$


Last edited by pludi; 03-22-2010 at 04:22 AM.. Reason: code tags, please...
kandi.reddy
# 2  
Old 03-22-2010
Code:
rm -f hi.txt

# 3  
Old 03-22-2010
it is not removed through super user as well....Can any one please help me how to remove the file with the above scenario
kandi.reddy
# 4  
Old 03-22-2010
Is "reddy" in the staff group like "kandir" is ? If so, "rm -f" should just work. Make sure you "rm" is the real command and not some broken alias like "rm -i" like Gnu/Linux does.
Try "/bin/rm -f" if you are unsure.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Can you do remove core file based on what created them :(

Hi, Currently, we have a Perl script from a third-party vendor that is generating core dumps. It has been reported. We can't turn off the script as it does generate some diagnostic file that's required. So at the moment, we have to let it continue to do its run. I wish I can say the vendor is... (8 Replies)
Discussion started by: newbie_01
8 Replies

2. Solaris

How to remove pkg from zone in newly created boot environment?

fyi, I already have SR opened with Oracle. We are looking to upgrade from S11.3 to S11.4 with the latest SRU. Create new BE; success Mount new BE; success pkg -R /mnt update the updating of the global went fine until it touched local zone. pkg: update failed (linked image... (2 Replies)
Discussion started by: samthewildone
2 Replies

3. AIX

To find the user who has created the file

Hi On our AIX 7.1 server we have a file named /content/development/system.tar with ownership as root. Many people on our Unix team has sudo access and they will be able to sudo to root user. We want to which particular user has actually created this file. Is it possible to find that ? Please... (7 Replies)
Discussion started by: newtoaixos
7 Replies

4. Shell Programming and Scripting

Changing file permissions of a file created by another user

Hi, I have used expdp for datapump. The .dmp file is created by the "oracle" user. my requirement is to make a zipped file of this .dmp file. What i am trying to do is change the permissions of this .dmp file from 0640 to 0644 and then do a gzip and zip it. Is there any way i can change... (3 Replies)
Discussion started by: qwertyu
3 Replies

5. Shell Programming and Scripting

Script to remove folders by date created

Hi All I require to generate a script that deletes folders and sub directoires from a set period after creation. So have folder X on a daily basis i have job folders being created folder name 1234568. What i need to do is keep this folder pruned. So say 7 days after creation of the job folder its... (4 Replies)
Discussion started by: treds
4 Replies

6. UNIX for Dummies Questions & Answers

Remove Occurrences created with Uniq -c

Hello, I have "mastered" the counting of occurrences with uniq -c. :D Now I need to keep that file neat and nice and remove only the occurrence number and the space after it. Example: 1286456 aaa 164758 aab aaa 112345 aac aaf should be turned into: aaa aab aaa aac aaf I... (6 Replies)
Discussion started by: hobbiecat
6 Replies

7. UNIX for Dummies Questions & Answers

how to know what time one user was created?

I am using RHEL. I wan to know the creation time of one user? which command? (4 Replies)
Discussion started by: cqlouis
4 Replies

8. Shell Programming and Scripting

Remove files which created date before 10 days on HP-UX

Hi All, Could you please let me know if there is any one can help to create a shell script to remove some files which is the created date for them greate than 10 days (sysdate-10) Please try to email me on email removed Thanks in advance, Murad (1 Reply)
Discussion started by: murad_fayez
1 Replies

9. UNIX for Dummies Questions & Answers

Files created by particular user

How i get the all the files created by particular user?? (2 Replies)
Discussion started by: Anshu
2 Replies

10. UNIX for Dummies Questions & Answers

I create user but i cant login the user i created.

I created a user, i login as a root. I add him in the group where he can access and login as a root! I checked it in users' list and in group's list, he is there. My problem is this, I cant login using the username/account I just created! What should i do to use and login the user/account i've just... (5 Replies)
Discussion started by: jerome
5 Replies
Login or Register to Ask a Question