The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find and delete the line gsusarla UNIX for Advanced & Expert Users 8 07-09-2008 05:15 PM
sed: find match and delete the line above cstovall Shell Programming and Scripting 3 07-02-2008 11:31 PM
Find a word and delete the line gsusarla UNIX for Dummies Questions & Answers 1 04-02-2008 03:45 PM
To Know this find and delete will work ???.. arunkumar_mca UNIX for Dummies Questions & Answers 4 12-27-2007 07:18 AM
unable to delete file for permission problem sabyasm UNIX for Dummies Questions & Answers 4 02-26-2006 08:55 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-24-2007
arunkumar_mca arunkumar_mca is offline
Registered User
  
 

Join Date: Oct 2004
Posts: 256
Find who has permission to delete

All,

I am running a script , which has permision as below

-r-xr-x--- 1 pmgr ffw 11660 Sep 3 2003 ccln

and tring to delete the file in the directory inter

(sys212ct:/>) ll | grep ^d

dr-xr-xr-x 32 bin bin 8192 Dec 24 03:24 etc
drwxr-xr-x 32 root root 1024 Nov 27 16:45 home
drwxrwsr-x 3 inter inter 10240 Dec 21 15:03 inter

(sys212ct:/>) cd inter
(sys22ct:/inter>) ll | head
-rw-r----- 1 int01 inter 11055 Jul 5 2006 06187.txt
-rw-r----- 1 int01 inter 9380 Jul 6 2006 06188.txt
-rw-r----- 1 int01 inter 24388 Jul 7 2006 06189.txt

How can i know that whether my script ccln is having permision to delete the files inside the directory . Please let me know how to find out
-r-xr-x--- 1 pmgr ffw 11660 Sep 3 2003 ccln
what are the operation the ccln can perform .

Inside ccln i am find the file and deleting the file . It is not working for directory inter that i mentioed above . Can any one let me know why an d how cani overcome the same

Thanks,
Arun
  #2 (permalink)  
Old 12-24-2007
arunkumar_mca arunkumar_mca is offline
Registered User
  
 

Join Date: Oct 2004
Posts: 256
Also i facing the below problem as well.

In my directory i am having many files and subdirectories. my directory is like below
drwxrwxr-x 5 root canusr 8192 Dec 5 12:50 tran

others dont have write permision

in side my directory the files i am having are
$cd tran
drwxr-xr-x 2 v1ftp cnur 8192 May 1 2007 v1ftp
drwxrwxrwx 3 v1ftp cnur 24576 Dec 24 06:00 v1
drwxrwxrwx 2 ham cnur 8192 Nov 6 09:28 itm
-rwxrwxrwx 1 scott cnur 1006258 Sep 19 15:33 7041012_cpy
-rwxrwxrwx 1 scott cnur 72928579 May 1 2007 uswst.gz

My question is :

When i use find and delete to delete the files that are 30 days old why the files 7041012_cpy and uswst.gz are not getting deleted .

Also the same find and delete command is deleting the file that 30 days old inside the dir v1

My Assumptions

Is that my directory is not having write permision the files in the dir is not getting deleted.


if so the how come the same command working and deleting the file inside the sub_directory.

Thanks,
Arun
  #3 (permalink)  
Old 12-26-2007
arunkumar_mca arunkumar_mca is offline
Registered User
  
 

Join Date: Oct 2004
Posts: 256
Thumbs up

All,

I have found some thing please correct me if i am wrong

1. If a file Doesnt have write permision we cannot delete the file
2. If a directory doesnt have write permision , We cannot delet eany files in sidethe directory.
3. If a directory doesnt have wrote permsion and its subdiretory has write permision we can delete the files inside the sub directory.

I am confused about this 3 rd point Even though the parent directory doesnt have write permision how unix allows the delete operation perform in it sub directory.

Thanks,
Arun
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0