Find the answer to your Linux question:
Results 1 to 5 of 5
Guys I tried to run this: ls * -lag > test1.txt And it gives me a 'Permission denied' for text1.txt (a new file to be created.) Now I have adm ...
  1. #1
    Just Joined!
    Join Date
    May 2011
    Posts
    6

    Permission denied making output file

    Guys I tried to run this:

    ls * -lag > test1.txt

    And it gives me a 'Permission denied' for text1.txt (a new file to be created.)

    Now I have adm privilages (in fact I'm the only one set up on it) and I can't figure out why I'm getting this 'Permission denied'.

    Do I have to create the file first and chmod so I can read/write/delete the file?

    Thanks!

  2. #2
    rrl
    rrl is offline
    Just Joined!
    Join Date
    May 2011
    Location
    NJ
    Posts
    45
    try:
    sudo ls * -lag>test1.txt.

  3. #3
    Just Joined!
    Join Date
    May 2011
    Posts
    6
    Thanks but I tried sudo first thing.

    Do I need to create the file first with privileges set?

    Thanks.

  4. #4
    rrl
    rrl is offline
    Just Joined!
    Join Date
    May 2011
    Location
    NJ
    Posts
    45
    can you create a blank file where you are trying to put the other one?

  5. #5
    Just Joined!
    Join Date
    May 2011
    Posts
    6
    Ok what it is doing is there are a few directories that seem to be a no-go. They belong to root and for some reason cannot be read.

    So it isn't the file being created or appended that fails.

    I did get most of it to work, just got a few failures.


    Thanks.

Posting Permissions

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