Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-17-2006, 06:11 AM   #1
LQ Newbie
Registered: Mar 2006
Posts: 1

Rep: Reputation: 0
change of permission in cp n mv


In linux when we copy or move one file from one dir to another dir the permission of that file get changed. the permission get change differently incase of cp and mv.

e.g. there is two dir, dir1 n dir2 the permission in dir1is 700 n dir2 is 755. now when the file, file1(having permission 777) from dir2 will be cp or mv to dir1 the permission will get change. i want to know in that case what will be the permission the file1 will get when it will cp or mv? and what is the rule it follows? is there any effect of dir permission in the file???

thank you
Old 03-17-2006, 07:10 AM   #2
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Can you show us the output? Are you copying to a location that does not support permissions? Usually, when you move a file the permissions, timestamps, etc. should not change. When you copy a file you are making a new file, so the copy will have the default permissions of a new file; unless you use the -p flag to preserve permissions, timestamps, etc.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't change permission karpa Linux - Newbie 29 03-15-2006 05:20 PM
Need ACCESS to change files! Every time I try to change a setting,"Permission Denied" Balarabay1 SUSE / openSUSE 2 03-06-2006 09:54 AM
change permission alma Linux - Newbie 5 10-28-2005 10:17 PM
Why I cannot change permission on /etc/sudoers? mikeshn Linux - Software 1 01-06-2005 11:26 AM
how to change user permission salahuddin_66 Slackware 10 04-22-2004 10:33 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration