Find the answer to your Linux question:
Results 1 to 5 of 5
hi all how to replace a file in user level.. i tried this Code: cp -r /usr/lib/munna.txt /usr/lib/ saying the error permission denied.. is there any way.. please help me ...
  1. #1
    Linux Newbie
    Join Date
    Feb 2007
    Location
    hyderabad, india
    Posts
    247

    replace a file in user level

    hi all
    how to replace a file in user level..
    i tried this
    Code:
    cp -r /usr/lib/munna.txt /usr/lib/
    saying the error permission denied..
    is there any way..

    please help me to replace a file in user level (not from root)

    thank you in advance
    "Relationships are built on trust and communication"

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Are you trying to copy the file to the same directory with the same name?
    Besides of that, only root has write permisions in de directory /usr/lib.

    Regards

  3. #3
    Linux Newbie
    Join Date
    Feb 2007
    Location
    hyderabad, india
    Posts
    247
    Quote Originally Posted by Franklin52 View Post
    Are you trying to copy the file to the same directory with the same name?
    Besides of that, only root has write permisions in de directory /usr/lib.

    Regards
    oh! sorry my question is wrong
    Code:
     	cp -f /usr/lib/munna/munna.txt /usr/lib/
    already there is a file munna.txt in /usr/lib
    while running my script the file must be copy or overwrite in /usr/lib

    please tell me if there is an other way..
    is there any way to give the permission to that folder..

    thank you in advance
    "Relationships are built on trust and communication"

  4. #4
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,096
    I'm not certain about what you are trying to do, either.

    Can you explain it better?

    Edit: sorry you posted while I was posting
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  5. #5
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Not clearly what you're trying but as earlier said, you need root permision to do that. The directory /usr/lib/munna was made by root so what's the problem to copy the file as root?

    Regards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...