Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I am very new in Linux & Ubuntu. I am trying run below command in ubuntu and get below error: echo "" > /etc/radiusclient/port-id-map Error: bash: /etc/radiusclient/port-id-map: Permission denied ...
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    1

    One Simple Problem

    Hi,
    I am very new in Linux & Ubuntu. I am trying run below command in ubuntu and get below error:
    echo "" > /etc/radiusclient/port-id-map

    Error: bash: /etc/radiusclient/port-id-map: Permission denied

    I tried sudo echo "" > /etc/radiusclient/port-id-map too, but got same error too.
    How to solve that?
    Regards,

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    955
    I suggest you do a ls -l on this file to find out what its permissions are. Doing a sudo doesn't always work immediately because there are some files that have been set not to be writeable by anyone, not even root.

    Of course, if you are root, you can get round that by changing the permissions on the file and then writing to it. But be cautious; if this file isn't writeable, there's probably a good reason for it.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    2,941
    The problem is likely to be permissions - you can't redirect output using sudo ...
    sudo -s will give you a root shell where you can do what you want ... as with everything linux there are other solutions

Posting Permissions

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