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 > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sort command - strange behaviour miwinter UNIX for Advanced & Expert Users 16 05-29-2008 07:19 AM
Longer commands and strange behaviour on ksh anurags UNIX for Dummies Questions & Answers 2 03-27-2008 11:04 AM
Strange sed behaviour vino UNIX for Advanced & Expert Users 8 02-12-2008 06:51 AM
/etc/passwd strange behaviour! penguin-friend Linux 0 06-06-2005 12:00 PM
very strange behaviour on unix server bolo77 UNIX for Dummies Questions & Answers 7 03-02-2005 03:32 PM

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

Join Date: Jul 2007
Location: Singapore
Posts: 32
A Strange Behaviour!!!

Can some-one give me a view to this :

I have a directory in an unix server, having permissions r-xr-xr-x .This directory is basically a source directory.
Now there is another directory basically the destination directory which has all the permissions.

Note:I log in as not the owner,but user of the group.

Is it possible to cp the files from the source directory to the destination directory.
(It was possible but i found it a bit erie as i didn't had the "w" permission in the source directory).

The second issue is I have a source directory with all the permissions.I have a file "abc" in that directory along with another file "def" in the same.
I created a 0 byte file "abc" in the destination directory having -r-xr-xr-x access but no 0 byte file for "def".
Now the erie thing is I am able to copy "abc" to the destination directory but not able to copy the file "def".

Note:I log in as not the owner,but user of the group.
WHY???
  #2 (permalink)  
Old 12-20-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by navojit dutta View Post
(It was possible but i found it a bit erie as i didn't had the "w" permission in the source directory).
I thought you were writing in the destination?

Quote:
Originally Posted by navojit dutta View Post
Now the erie thing is I am able to copy "abc" to the destination directory but not able to copy the file "def".
What are the permissions of "def" in the source directory?
  #3 (permalink)  
Old 12-20-2007
navojit dutta navojit dutta is offline
Registered User
  
 

Join Date: Jul 2007
Location: Singapore
Posts: 32
Hi porter,

In both the cases i was trying to copy to the destination.

And the permission for "def" can be -rwxrwxrwx or -r-xr-xr-x,tried with both.
the directory where i wanted to copy def had -r-xr-xr-x.
Hope i gave ur reply.
thanks....and the reason please?
  #4 (permalink)  
Old 12-20-2007
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
To copy stuff, you read from the source and write to the destination. Which of these operations do you think should require write permission on the source? I guess you have never copied anything from a CD?
  #5 (permalink)  
Old 12-21-2007
navojit dutta navojit dutta is offline
Registered User
  
 

Join Date: Jul 2007
Location: Singapore
Posts: 32
Hi Perdorabo,
Thanks for you comments but in the second case I think you may have noticed that I am trying to copy to the destination which doesn't have the write permissions.
So in that case would the CD rule persist ?
  #6 (permalink)  
Old 12-21-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
How to make things simple?

How about "You need write permissions to write."

Nothing odd or strange going on.
Sponsored Links
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 11:01 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