Monday, April 30, 2012

cp: cannot create regular file ' ': Permission denied

if u are facing the below message when u used copy command in unix ,   cp


cp: cannot create regular file '<some file name>  ': Permission denied


for example lets see


cp conneclog.ksh ./oms


u types above command and we got the above error message then try to give write permissions to target directory using chmod commnand like below




chmod 777 oms


then try the copy command


cp conneclog.ksh ./oms


if the success then ther only no message , file silectly copied to oms directory




note : to check the file file permissions u can type below command


ls -l  (this command)




:please let me know still any issue on this

15 comments:

  1. when i was copying files it is working fine in csh shell but it gives the same error in bash shell

    ReplyDelete
  2. Thanks for very helpful tips ......

    ReplyDelete
  3. Try and download " Long Path Tool " is also useful in situations where you see these error messages: Cannot read from source file or disk, there has been a sharing violation, cannot delete file or folder, the file name you specified is not valid or too long, the source or destination file may be in use and many other file managing errors.

    ReplyDelete